ASP.NET and the n-Tier architecture can work great together to build world-class web applications. The concepts of layer and tier are often used interchangeably. One common point of view is that there is a difference, and that a layer is a logical structuring mechanism for the elements that make up the software solution, while a tier is a physical structuring mechanism for the system infrastructure.
The main advantage of using n-Tier is that the complexity associated with the business and the process is reduced and is easy to implement. The elements of performance, scalability and future development issues need to be considered when deciding on the architecture of the application.
The n-Tier application has three tiers or layers; they are called the presentation layer, the business layer and the data layer. Each layer interacts with the layer directly below, and has specific function to perform. The presentation layer is responsible for displaying the user interface to the end user. The programmer uses this layer for designing the user interface and to transfer data. In ASP.NET, ASPX pages, user controls, server controls and sometimes security related classes and objects are used to support the presentation layer.
The business layer works as a go-between to transfer the data from presentation layer. In the three-tier architecture, the data access layer does not interact directly with the presentation layer. The architecture in ASP.NET includes using SqlClient or OleDb objects to retrieve, update and delete data from SQL Server or other databases and passing the data retrieved to the presentation layer in a DataReader or DataSet object, or a custom collection object. The data layer gets the data from the business layer and sends it to the database or vice versa.
In an ASP.NET n-Tiered architecture, web pages do not make direct calls to the database. A given layer only communicates with its adjacent layers. ASP.NET Web pages should reference custom objects defined in the business object layer. These objects provide database information in a class structure.
Implementing ASP.NET applications using the n-Tier architecture supports a uniform, building block approach to application designs. Hardware and software for presentation, application and database functions can be scaled separately, and included more easily when dealing with complex business environments.
Article brought to you courtesy of cSharp4Newbies.com.