1. Three-tier architecture 1. Presentation layer (USL or UIL (User Interface Layer): it mainly represents the Web mode, or the winform mode. If the logic layer is powerful and complete, the logic layer can provide complete services regardless of how the presentation layer is defined and changed. 2. Business logic layer (BLL (Bussiness logic layer): This layer is mainly used to operate on specific problems. It can also be understood as an operation on the data layer to process the data business logic. If the data layer is a building block, the logic layer is the building of these building blocks. 3. data access layer (DAL): mainly refers to the operation layer for raw data (in the form of storing data such as databases or text files), rather than raw data, that is, is the operation of data, not the database, specifically for the business logic layer or the presentation layer to provide data services. Ii. Differentiation 1. Presentation Layer: mainly accept user requests and return data, providing applications for clientsProgram. 2. Business logic layer: it is mainly responsible for the operations on the data layer, that is, the combination of some operations on the data layer. 3. Data access layer: it mainly depends on whether your data layer contains logical processing. In fact, its functions mainly perform various operations on data files, without having to worry about other operations. Iii. Summary A layer-3 structure is a strictly hierarchical method, that is, the data access layer can only be accessed by the business logic layer, and the business logic layer can only be accessed by the presentation layer. Users send requests to the business logic layer through the presentation layer, the business logic layer completes the relevant business rules and logic, accesses the database through the data access layer to obtain data, and then returns the data in reverse order to display the data in the presentation layer. Some layer-3 structures also include other layers such as factory and model, which are actually an extension and application based on the layer-3 structure. |