SlideShare a Scribd company logo
1 of 12
Download to read offline
Real Time
Mohd Manzoor Ahmed
(www.ManzoorTheTrainer.com)
Asp.Net MVC Web App On 3-Tier
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
1 | P a g e
Asp.Net MVC Web App on 3-Tier for Beginners – (Part-1)
Objective: The objective of this article series is to make the beginners understand how
the data moves from one layer to another layer in Asp.Net MVC web app when it is
designed on 3-layers.
Overview:
Q. Do you want to see a live web app built on 3-Tier arch using Asp.Net MVC, jQuery,
Bootstrap, C#.Net, Entity Framework and MS SQL Server?
A. Here it is http://linkhub.manzoorthetrainer.com/
Q. Are you really excited to learn how to develop this 3-tier web app on Asp.Net MVC
and Entity Framework?
A. Then you are going to learn it here with me from scratch.
In this article we are going to learn how to break requirements into objects and
find relation among them. We will then learn designing database out of this objects and
relationships. Moving forward we will also see how to design a basic 3-Tier architecture
of the project and implement various layers. We are going to learn implementation of
business object layer using Entity Framework and data access layer using repository
design pattern and Entity Framework.
For user interface we will see Asp.Net MVC, jQuery and Bootstrap. We will learn how
bootstrap makes our application responsive. We will also see how to implement custom
sorting and paging. Moving ahead you will learn forms validations and business rules
validations as well. We are going to secure our app using custom membership provider
and role provider and publish it on web.
In Advance operations we will try to understand how to implement transactions, bind
multiple models to single view and Ajaxifiying our Asp.Net web App. Finally we will also
see few SSRS client side reporting.
Tools Requirements:
 SQL Server 2008 Express or Higher
 VS2013 express or higher
Target Audience:
 Should be good at OOPs through C#.Net
 Should have good understanding of Asp.Net MVC and Entity Framework
Disclaimer:
The sample code is solely based on my self-study, research results and based on any
practical project. The code is just for the purpose to explain the overall architecture only.
If you want to use the code in your project, you need to enrich and modify it to meet
your own need. In addition, the CRUD operations in the sample project is very primitive
with basic features, you can enrich them with some advanced features.
Content:
1: Introduction
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
2 | P a g e
Introduction
2: Analysis And Design
Requirements Gathering, Identifying Objects And Relationships, Designing Database,
Database Implementation And Understanding Architecture, Creating Solution And
Projects.
3: Implementing All The Layers
Creating Business Object Layer Using Entity Framework, UI Prototyping, Designing
Controllers And Actions, Implementing Bootstrap
4: Implementing User And Admin Module
Creating Data Access Layer Using Repository Design Pattern, Creating Business Logic
Layer And Implement BrowseUrLs, Filtering BrowseURLs, Implementing Custom Sorting
in MVC on BrowseUrls table, Implementing Custom Paging in MVC on BrowseUrls table,
Implementing ListUsers, ListCategory And DeleteCategory
5: Architectural Enhancements And Validations
Implementing CreateCategory With Forms Validation, Implementing SubmitUrl And
Adding Base Class in BLL - AdminBsClass, Creating Base Classes For BLL And
ControllersI, mplementing Approve Urls And UserRegistration
6: Securing Asp.Net MVC Web App
Implementing Authentication-I, Implementing Authentication-II, Implementing
Authorization
7: Applying Bootstrap Theme
Applying New Bootstrap Theme And Implementing Slider-I, Applying New Bootstrap
Theme And Implementing Slider-II
8: Implementing Transactions
Binding Multiple Models To A Single View, Working With Identity Field, Transactions
9: Ajaxifying An MVC App
Ajaxifying Demo, Making A JQuery Based Ajax Call, Implementing Approve And Reject
ALL With Update Progress Bar, Partial Page Update In MVC
10: External Login
Login With Gmail, Login With Facebook
11: The Final Push
ProjectSetup - Source Code, Publishing Your Site Live
12: Reports In Asp.Net MVC
RDLC Reports In Asp.Net
1: Introduction
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
3 | P a g e
Introduction: Link hub is a web portal where a user can submit their portal URL under
a specific category to be shared on link hub. Admin can approve or reject the URL
submitted by the user and in each case an email is sent out to the user. Once the link is
approve it will be available on the link hub portal.
This is what we are going to achieve:
Screen-1. User Registration
Screen-2: User Login
Screen-3: Submit URL After Login
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
4 | P a g e
Screen-4: URL approval by Admin
Screen-5: Browse All The Approved URL
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
5 | P a g e
Note: In future articles we will also try to do see some extra features whose screen are
not described here.
2: Analysis And Design (Requirements Gathering, Identifying Objects And
Relationships, Designing Database, Database Implementation)
Let us say that the client has given us a brief requirements or you can also called it as
user story i.e., They need to develop a portal called as LINKHUB…
Link hub is a web portal where a user can submit their portal URL under a specific
category to be shared on link hub. Admin can approve or reject the URL submitted by
the user and in each case an email is sent out to the user. Once the link is approve it will
be available on the link hub portal.
Step-1: From the above requirements let us define the roles and responsibilities first
Defining the Roles & Responsibilities Roles:
 User
o Can Browse URLs
o Can Register
o Can Submit A URL
 Admin
o Can CRUD Category
o Can View All Users
o Can ApproveOrReject URL
Step-2: Now let us identify the object
Objects
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
6 | P a g e
 User
 Category
 URL
Step-3: Now we need to find the relationship among these objects
Relationships
 Category : Url (1:M) (As a single category can have many urls)
 User : Url (1:M) (As a single user can upload many urls)
Step-4: Once we have objects and relationships with us, we can go designing the data
base with the 3 key rules of database design
3 Key Rules For Database Design
1. One table for each object
2. For 1:M relationship. 1 will become master and M will become child i.e., primary key
of 1 will act as a foreign key for M.
Eg:Department : Employees is 1 : M Department
3. M:M relationship. Both the objects will become master and there will be one more new
table called as transaction table or child table with primary keys of masters as foreign
Keys in it.
Eg:Student : Course is M : M
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
7 | P a g e
With these above three rules our data base design would look something like this and
role column in the tbl_User table will differentiate a normal user as ‘U’ and Admin as ‘A’
LinkHubDb
Let us implement it:
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
8 | P a g e
Step-5: Once we have our datadase ready we need to insert few meaning full and
dummy records which will help us in further implementation process.
Understanding The Architecture:
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
9 | P a g e
Data Access Layer: In the above architecture our application’s back end is MS SQL
Server and to access the data from the database we are using ADO.Net Entity
Framework and we call it as Data Access Layer (DAL).
Business Logic Layer: Before I store data into the database or after reading data from
the database I need to perform some business logic on the data. For example I want to
store the salary of an employee and it is $25 per hour and say he is worked for 50hrs.
So, his salary would be calculated as 25X50=1250$ which is called as business logic and
this logical code will go to business logic layer and it will be developed using C#.Net
programming language. So, here it is Business Logic Layer (BLL).
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
10 | P a g e
UI: Now, how do I interact with the application? Yes, the interface from which I interact
with the application is called as user interface of presentation logic layer where we see
all the form controls like textboxes, buttons, grids, etc., and we are going to use Asp.Net
MVC 5 to implement our presentation Logic layer (PLL).
Business Object Layer: And finally how do I pass the data from one layer to another
layer? We need a container to store the data so that we can pass that container to other
layers and that container is called as business object and they reside in business object
layer (BOL).
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
11 | P a g e
Therefore we need to have a solution which should contain the following four project
1. UI (Asp.Net MVC Web App)
2. BOL (C# Class Library to generate a dll)
3. BLL (C# Class Library to generate a dll)
4. DAL (C# Class Library to generate a dll)
Thanks for reading 
Complete video tutorial of this course at a discount of 50% is here Enroll Now

More Related Content

What's hot

Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP DevelopersEdureka!
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1晟 沈
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project ReportKodexhub
 
MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4晟 沈
 
MVC for Desktop Application - Part 2
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2晟 沈
 
Best Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and TricksBest Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and TricksTechtic Solutions
 
MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3晟 沈
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrAfreenK
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeLaurence Svekis ✔
 
Monster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsMonster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsLaurence Svekis ✔
 
PHP MVC Tutorial
PHP MVC TutorialPHP MVC Tutorial
PHP MVC TutorialYang Bruce
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)IT PROGRAMMING WORLD
 
10 ways to bind multiple models on a view in mvc code project
10 ways to bind multiple models on a view in mvc   code project10 ways to bind multiple models on a view in mvc   code project
10 ways to bind multiple models on a view in mvc code projectAkshat Kumar
 
ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC IntroductionSumit Chhabra
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0Michael Fons
 

What's hot (20)

Principles of MVC for PHP Developers
Principles of MVC for PHP DevelopersPrinciples of MVC for PHP Developers
Principles of MVC for PHP Developers
 
Mvc Training
Mvc TrainingMvc Training
Mvc Training
 
MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4
 
MVC for Desktop Application - Part 2
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2
 
Best Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and TricksBest Laravel Eloquent Tips and Tricks
Best Laravel Eloquent Tips and Tricks
 
MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3
 
The complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrrThe complete-beginners-guide-to-react dyrr
The complete-beginners-guide-to-react dyrr
 
ASP.NET MVC3 RAD
ASP.NET MVC3 RADASP.NET MVC3 RAD
ASP.NET MVC3 RAD
 
JavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive CodeJavaScript DOM - Dynamic interactive Code
JavaScript DOM - Dynamic interactive Code
 
Monster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applicationsMonster JavaScript Course - 50+ projects and applications
Monster JavaScript Course - 50+ projects and applications
 
5 angularjs features
5 angularjs features5 angularjs features
5 angularjs features
 
PHP MVC Tutorial
PHP MVC TutorialPHP MVC Tutorial
PHP MVC Tutorial
 
Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)Tightly coupled view (model bounded view)
Tightly coupled view (model bounded view)
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
10 ways to bind multiple models on a view in mvc code project
10 ways to bind multiple models on a view in mvc   code project10 ways to bind multiple models on a view in mvc   code project
10 ways to bind multiple models on a view in mvc code project
 
ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC Introduction
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
 

Similar to Asp net-mvc-3 tier

ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S GuideAlicia Buske
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 dayQuach Long
 
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Akhil Mittal
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocusAlexander Vogel
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsWebStackAcademy
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the informationToushik Paul
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicekrishmdkk
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web MahmoudOHassouna
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayLanate Drummond
 
Junaid Saghir updated cv (3)
Junaid Saghir updated cv (3)Junaid Saghir updated cv (3)
Junaid Saghir updated cv (3)Junaid Saghir
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Rich Helton
 

Similar to Asp net-mvc-3 tier (20)

ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5  Building Your First Web Application (A Beginner S GuideASP.NET MVC 5  Building Your First Web Application (A Beginner S Guide
ASP.NET MVC 5 Building Your First Web Application (A Beginner S Guide
 
ASP.NET Identity
ASP.NET IdentityASP.NET Identity
ASP.NET Identity
 
learn mvc project in 7 day
learn mvc project in 7 daylearn mvc project in 7 day
learn mvc project in 7 day
 
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...Enterprise Level Application Architecture with Web APIs using Entity Framewor...
Enterprise Level Application Architecture with Web APIs using Entity Framewor...
 
Meera3.9
Meera3.9Meera3.9
Meera3.9
 
No brainer
No brainerNo brainer
No brainer
 
Software Portfolio - SetFocus
Software Portfolio - SetFocusSoftware Portfolio - SetFocus
Software Portfolio - SetFocus
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
Part 1 implementing a simple_web_service
Part 1 implementing a simple_web_servicePart 1 implementing a simple_web_service
Part 1 implementing a simple_web_service
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
Ajaykumar_last
Ajaykumar_lastAjaykumar_last
Ajaykumar_last
 
Resume
ResumeResume
Resume
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
 
Junaid Saghir updated cv (3)
Junaid Saghir updated cv (3)Junaid Saghir updated cv (3)
Junaid Saghir updated cv (3)
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
 

Asp net-mvc-3 tier

  • 1. Real Time Mohd Manzoor Ahmed (www.ManzoorTheTrainer.com) Asp.Net MVC Web App On 3-Tier
  • 2. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 1 | P a g e Asp.Net MVC Web App on 3-Tier for Beginners – (Part-1) Objective: The objective of this article series is to make the beginners understand how the data moves from one layer to another layer in Asp.Net MVC web app when it is designed on 3-layers. Overview: Q. Do you want to see a live web app built on 3-Tier arch using Asp.Net MVC, jQuery, Bootstrap, C#.Net, Entity Framework and MS SQL Server? A. Here it is http://linkhub.manzoorthetrainer.com/ Q. Are you really excited to learn how to develop this 3-tier web app on Asp.Net MVC and Entity Framework? A. Then you are going to learn it here with me from scratch. In this article we are going to learn how to break requirements into objects and find relation among them. We will then learn designing database out of this objects and relationships. Moving forward we will also see how to design a basic 3-Tier architecture of the project and implement various layers. We are going to learn implementation of business object layer using Entity Framework and data access layer using repository design pattern and Entity Framework. For user interface we will see Asp.Net MVC, jQuery and Bootstrap. We will learn how bootstrap makes our application responsive. We will also see how to implement custom sorting and paging. Moving ahead you will learn forms validations and business rules validations as well. We are going to secure our app using custom membership provider and role provider and publish it on web. In Advance operations we will try to understand how to implement transactions, bind multiple models to single view and Ajaxifiying our Asp.Net web App. Finally we will also see few SSRS client side reporting. Tools Requirements:  SQL Server 2008 Express or Higher  VS2013 express or higher Target Audience:  Should be good at OOPs through C#.Net  Should have good understanding of Asp.Net MVC and Entity Framework Disclaimer: The sample code is solely based on my self-study, research results and based on any practical project. The code is just for the purpose to explain the overall architecture only. If you want to use the code in your project, you need to enrich and modify it to meet your own need. In addition, the CRUD operations in the sample project is very primitive with basic features, you can enrich them with some advanced features. Content: 1: Introduction
  • 3. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 2 | P a g e Introduction 2: Analysis And Design Requirements Gathering, Identifying Objects And Relationships, Designing Database, Database Implementation And Understanding Architecture, Creating Solution And Projects. 3: Implementing All The Layers Creating Business Object Layer Using Entity Framework, UI Prototyping, Designing Controllers And Actions, Implementing Bootstrap 4: Implementing User And Admin Module Creating Data Access Layer Using Repository Design Pattern, Creating Business Logic Layer And Implement BrowseUrLs, Filtering BrowseURLs, Implementing Custom Sorting in MVC on BrowseUrls table, Implementing Custom Paging in MVC on BrowseUrls table, Implementing ListUsers, ListCategory And DeleteCategory 5: Architectural Enhancements And Validations Implementing CreateCategory With Forms Validation, Implementing SubmitUrl And Adding Base Class in BLL - AdminBsClass, Creating Base Classes For BLL And ControllersI, mplementing Approve Urls And UserRegistration 6: Securing Asp.Net MVC Web App Implementing Authentication-I, Implementing Authentication-II, Implementing Authorization 7: Applying Bootstrap Theme Applying New Bootstrap Theme And Implementing Slider-I, Applying New Bootstrap Theme And Implementing Slider-II 8: Implementing Transactions Binding Multiple Models To A Single View, Working With Identity Field, Transactions 9: Ajaxifying An MVC App Ajaxifying Demo, Making A JQuery Based Ajax Call, Implementing Approve And Reject ALL With Update Progress Bar, Partial Page Update In MVC 10: External Login Login With Gmail, Login With Facebook 11: The Final Push ProjectSetup - Source Code, Publishing Your Site Live 12: Reports In Asp.Net MVC RDLC Reports In Asp.Net 1: Introduction
  • 4. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 3 | P a g e Introduction: Link hub is a web portal where a user can submit their portal URL under a specific category to be shared on link hub. Admin can approve or reject the URL submitted by the user and in each case an email is sent out to the user. Once the link is approve it will be available on the link hub portal. This is what we are going to achieve: Screen-1. User Registration Screen-2: User Login Screen-3: Submit URL After Login
  • 5. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 4 | P a g e Screen-4: URL approval by Admin Screen-5: Browse All The Approved URL
  • 6. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 5 | P a g e Note: In future articles we will also try to do see some extra features whose screen are not described here. 2: Analysis And Design (Requirements Gathering, Identifying Objects And Relationships, Designing Database, Database Implementation) Let us say that the client has given us a brief requirements or you can also called it as user story i.e., They need to develop a portal called as LINKHUB… Link hub is a web portal where a user can submit their portal URL under a specific category to be shared on link hub. Admin can approve or reject the URL submitted by the user and in each case an email is sent out to the user. Once the link is approve it will be available on the link hub portal. Step-1: From the above requirements let us define the roles and responsibilities first Defining the Roles & Responsibilities Roles:  User o Can Browse URLs o Can Register o Can Submit A URL  Admin o Can CRUD Category o Can View All Users o Can ApproveOrReject URL Step-2: Now let us identify the object Objects
  • 7. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 6 | P a g e  User  Category  URL Step-3: Now we need to find the relationship among these objects Relationships  Category : Url (1:M) (As a single category can have many urls)  User : Url (1:M) (As a single user can upload many urls) Step-4: Once we have objects and relationships with us, we can go designing the data base with the 3 key rules of database design 3 Key Rules For Database Design 1. One table for each object 2. For 1:M relationship. 1 will become master and M will become child i.e., primary key of 1 will act as a foreign key for M. Eg:Department : Employees is 1 : M Department 3. M:M relationship. Both the objects will become master and there will be one more new table called as transaction table or child table with primary keys of masters as foreign Keys in it. Eg:Student : Course is M : M
  • 8. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 7 | P a g e With these above three rules our data base design would look something like this and role column in the tbl_User table will differentiate a normal user as ‘U’ and Admin as ‘A’ LinkHubDb Let us implement it:
  • 9. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 8 | P a g e Step-5: Once we have our datadase ready we need to insert few meaning full and dummy records which will help us in further implementation process. Understanding The Architecture:
  • 10. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 9 | P a g e Data Access Layer: In the above architecture our application’s back end is MS SQL Server and to access the data from the database we are using ADO.Net Entity Framework and we call it as Data Access Layer (DAL). Business Logic Layer: Before I store data into the database or after reading data from the database I need to perform some business logic on the data. For example I want to store the salary of an employee and it is $25 per hour and say he is worked for 50hrs. So, his salary would be calculated as 25X50=1250$ which is called as business logic and this logical code will go to business logic layer and it will be developed using C#.Net programming language. So, here it is Business Logic Layer (BLL).
  • 11. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 10 | P a g e UI: Now, how do I interact with the application? Yes, the interface from which I interact with the application is called as user interface of presentation logic layer where we see all the form controls like textboxes, buttons, grids, etc., and we are going to use Asp.Net MVC 5 to implement our presentation Logic layer (PLL). Business Object Layer: And finally how do I pass the data from one layer to another layer? We need a container to store the data so that we can pass that container to other layers and that container is called as business object and they reside in business object layer (BOL).
  • 12. www.ManzoorTheTrainer.com Complete video tutorial of this course at a discount of 50% is here Enroll Now 11 | P a g e Therefore we need to have a solution which should contain the following four project 1. UI (Asp.Net MVC Web App) 2. BOL (C# Class Library to generate a dll) 3. BLL (C# Class Library to generate a dll) 4. DAL (C# Class Library to generate a dll) Thanks for reading  Complete video tutorial of this course at a discount of 50% is here Enroll Now