ASP Net MVC 3tier
ASP Net MVC 3tier
www.ManzoorTheTrainer.com
Target Audience:
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
Complete video tutorial of this course at a discount of 50% is here Enroll Now
1|Page
www.ManzoorTheTrainer.com
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
Complete video tutorial of this course at a discount of 50% is here Enroll Now
2|Page
www.ManzoorTheTrainer.com
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
Complete video tutorial of this course at a discount of 50% is here Enroll Now
3|Page
www.ManzoorTheTrainer.com
Complete video tutorial of this course at a discount of 50% is here Enroll Now
4|Page
www.ManzoorTheTrainer.com
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
o
o
Admin
o
o
o
Complete video tutorial of this course at a discount of 50% is here Enroll Now
5|Page
www.ManzoorTheTrainer.com
User
Category
URL
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
Complete video tutorial of this course at a discount of 50% is here Enroll Now
6|Page
www.ManzoorTheTrainer.com
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:
Complete video tutorial of this course at a discount of 50% is here Enroll Now
7|Page
www.ManzoorTheTrainer.com
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.
Complete video tutorial of this course at a discount of 50% is here Enroll Now
8|Page
www.ManzoorTheTrainer.com
Data Access Layer: In the above architecture our applications 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).
Complete video tutorial of this course at a discount of 50% is here Enroll Now
9|Page
www.ManzoorTheTrainer.com
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).
Complete video tutorial of this course at a discount of 50% is here Enroll Now
10 | P a g e
www.ManzoorTheTrainer.com
Therefore we need to have a solution which should contain the following four project
1.
2.
3.
4.
Complete video tutorial of this course at a discount of 50% is here Enroll Now
Complete video tutorial of this course at a discount of 50% is here Enroll Now
11 | P a g e