Implementing N-Tier Architecture in Web Applications

N-Tier Architecture

 

The word N-Tier means Multiple Tiers.

 

N-Tier Architecture is nothing but splitting your solution into multiple projects based on the business requirements.

 

Advantages:

  1. Reduce the business and the programming complexity.

  2. Easy to process 

Procedure

 

Use the following procedure to create a sample of using an N-Tier system:

 

1. Create a solution.

2. Include a web application project in it and name it "PRESENTATION LAYER".

3. Include a Class Library Project and name it "DATALAYER".

 

 N-Tier1

 

4. Include a Class Library Project and name it "BUSINESSLAYER".

 

5. Now you have 3 projects in a single solution.

 

6. Build the DataLayer.

 

7. Go to the Business layer and right-click on "References" and in References go to "Projects". Here you can see the Datalayer. Click on that and include as reference.

 

8. Now in the Business Layer reference you can see the DataLayer assembly.

 

9. Go to Presentationlayer and right-click on reference and in reference go to Project's. Here you can see the BusinessLayer. Click on that and include as reference.

 

10. Now you can see the BusinessLayer Assembly in the Presentation Layer.

 

11. Now you can access all the methods.

 

DataLayer in Business Layer

BusinessLayer in PresentationLayer

 

N-Tier02


 

12. This is how you build your N-Tier Application. For example, this is a 3-Tier System.


Similar Articles