Three layers: UI (interface), BLL (business logic layer), DAL (data access layer) These three are must-haves, of which BLL and the classes in DAL are public classes, because the UI needs to call BLL, and BLL needs to call DAL, and UTILITY (the underlying method for connecting to the database and performing basic operations of "adding, deleting, modifying, and checking"). In addition, there can also be entity layers such as ENTITY (which maps data tables) and Common (this library generally places some general methods, such as data validation methods, control operation methods, etc.). Simply put, it is Accessing data from the database is a data access layer Sorting out the business relationships of related data is a layer of business logic The representation of the collated data shows that this is a representation layer.
By the way, I helped you find some information: A good hierarchical structure can make the division of labor for developers clearer. Once the interfaces between the layers are defined, developers responsible for different logic designs can disperse their efforts and work hand in hand. For example, UI personnel only need to consider the experience and operation of the user interface, domain designers can only focus on the design of business logic, and database designers do not have to worry about cumbersome user interactions. Each developer's task is confirmed, and the development progress can be quickly improved.
The benefits of loose coupling are clear. If a system is not hierarchical, then their logic is tightly intertwined and interdependent, and no one is replaceable. Once a change occurs, it will affect the whole body, and the impact on the project will be extremely serious. Reducing the dependence between layers can not only ensure future scalability, but also have obvious advantages in reusability. Once each functional module has defined a unified interface, it can be called by each module without having to develop the same function repeatedly.
To carry out a good hierarchical structure design, standards are also essential. Only on a certain level of standardization can this system be scalable and replaceable. The communication between layers also necessarily ensures the standardization of interfaces.
|