Compared with ASP, ASP. NET is easier and more efficient in Web application development. Most Web development focuses on data operations, creating databases to store data, and writingCodeAccess and modify data, and design the interface to collect and present data. After going through the Asp.net learning phase, when I really started to develop a web project, I found that the complicated data and association was not simply solved by the sqldatasource and accessdatasource data source controls, it is precisely a neglected objectdatasource data source control that is the key to truly step into the development threshold, and thus has a preliminary experience for the three-tier architecture model.
I. Introduction to ASP. NET three-layer architecture
The hierarchical architecture in the design pattern (refer to the MVC pattern in J2EE) achieves different responsibilities and does not interfere with each other. Therefore, if the requirements of any layer change, you only need to change the code in the corresponding layer without affecting the code in other layers. In this way, the Division of Labor in Development can be better achieved, which is conducive to the reuse of components. Therefore, the research on models over the years has made many achievements and has been widely used. A good mode is available inProgramIt plays an important role in development and post-maintenance.
ASP. NET three-tier architecture is divided from the bottom up into: data access layer (DAL), business logic layer (BLL) and presentation layer (PL ).
Data access layer (DAL): uses a strongly-typed dataset as the data access layer, but simply adds, deletes, and modifies data, common Data Access methods such as query and judgment (provided by SQL statements) should not have transactions.
Business logic layer (BLL): the business logic layer is a bridge between the data access layer and the presentation layer for data exchange. It calls a method combination in the data access layer according to business needs, A collection of various business rules into a Bll, such as data operations or transactions that are judged by conditions. Bll is implemented in the form of class library.
Presentation layer (PL): The presentation layer provides a graphical interface of application services for interaction. It helps users understand and efficiently locate application services, and presents data transmitted in the business logic layer. It uses ASP.. NET page.