Layer-3 structure explanation
The layer-3 architecture adds an intermediate layer between the client and the database, also known as the component layer. Here
The three-tier system does not refer to the three-tier physical systems, either simply placing three machines or the three-tier architecture.
A B/S application is not only a three-tier architecture, but a three-tier architecture refers to a logic layer.
Machines. Application of Three-tier systemProgramPutting business rules, data access, and legality verification into the process
Layer. Normally, the client does not directly interact with the database, but uses COM/DCOM
Connect to the middle layer, and then exchange with the database through the middle layer.
Understanding the three-tier structure in ASP. NET
We use a three-tier structure to make the project structure clearer and the division of labor clearer, which is conducive to later maintenance and upgrade.
Three layers: presentation layer (USL), business logic layer (BLL), data access layer (DAL)
1. Data access layer: it is the operation layer for raw data (in the form of database or text files that store data), instead
It refers to raw data, that is, operations on data, rather than databases, providing data services for the business logic layer or presentation layer.
2: business logic layer: This layer is mainly used to address specific problems. It can also be understood as a pair of operations on the data layer.
If the data layer is a building block, the logic layer is the construction of these building blocks.
3: Presentation Layer: It mainly indicates the Web mode, or the winform mode. The Web mode can also be expressed
: Aspx. If the logic layer is quite powerful and complete, the logic layer can be improved regardless of how the presentation layer is defined and changed.
Provide services.
Specific differentiation methods
1: Data access layer: it mainly depends on whether your data layer contains logic processing. In fact, its functions are mainly completed.
Operations on data files. You do not have to worry about other operations.
2: business logic layer: mainly responsible for operations on the data layer. That is to say, some data layer operations are combined.
3: Presentation Layer: This layer mainly accepts user requests and returns data to provide client access to applications.
Three-layer structure in ASP. NET
What are the perfect traps? Modify the presentation layer without modifying the logic layer, instead of modifying the data layer.
Otherwise, it is hard to say whether your application has a multi-layer structure, or whether there is a problem with the Division and organization of the layer structure.
Different applications have different understandings, which is a conceptual issue.