Architecture is an important feature and it is the first step in the development of an application. n-Tier the term is used to indicate multiple tier or multiple layers. n-Tier Architecture splits the solution process into different projects based on the business requirements. The main advantage of using n-Tier is that the complexity associated with the business and the process is reduced in a way that it is easy to work. When you decide on the architecture of the application, depending on the priorities required you need to consider the issues pertaining to the elements of performance, scalability and future development.
The n-Tier application has three tiers or layers. These are the presentation tier, the business tier and the data tier. Each layer of the tiers interacts with the layer directly below, and has specific functions to perform. Presentation Layer is responsible for displaying user interface to either programmer or end user. Programmer uses this layer for designing purpose and to transfer the data back and forth. In ASP.NET it includes ASPX pages, user controls, server controls and sometimes security related classes and objects.
The Business layer works as a mediator which helps to transfer the data from presentation layer. In the three tier architecture the data access layer will not be able to interact 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 from the Access databases and pass 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. This layer is further divided into two sub layers Business Logic Layer (BLL) and Data Access Layer (DAL). DAL is responsible for accessing data and forwarding it to BLL. In ASP.NET it uses SqlClient or OleDb to retrieve the data and send it to BLL in the form of a DataSet or DataReader. BLL (Business Logic Layer) is responsible for preparing or processing the data retrieved and sends it to the presentation layer.
The Data layer gets the data from the business layer and sends it to the database or it gets the data from the database and sends it to the business layer. In ASP .NET this database is an SQL Server or Access database. It can also be Oracle, mySQL or even XML.
In an ASP.NET n-tiered architecture you will find that web pages do not make direct calls to the database. A given layer is able to communicate only with its neighboring layers. ASP.NET Web pages should always reference the custom objects defined in the business object layer. These objects provide the database information in the form of a class structure.
The n-Tier architecture supports a more uniform, building block approach to application designs by means of partitioning the ASP.NET applications into front-end, middle tier and back-end layers. Hardware and software used for presentation, application and database functions can be scaled separately, and these can be included more easily into complex e-Business environments.
As said in this article, N-tier architecture always comes handy in case of transactions between web and database. We at “Golden Web Design” always strategize on the transaction model and ensure that the product is always faster and quicker to load & process. We have written this article to provide an insight on our capabilities not in terms of quick development but also on how we concentrate on each aspect of the project.