Why software development needs reasonable architecture design, the reason is simple: achieve high cohesion, low coupling, closed to modify, open to expansion;
The following is a simple introduction to the form of a diagram of the common form of architecture, due to the limited personal level, there may be deficiencies, or even the wrong place, please correct me, thank you!
One or three-tier architecture:
Advantages:
1, a clear division of labor, developers can only focus on the whole structure of one of the layers;
2, loose coupling, change the layer and layer of interdependence, forming a bottom-up dependency (also known as dependency inversion), so as long as the high level does not change, the bottom layer does not need to change;
3, the reuse is high, the business logic layer and the data access layer can be used in other applications to implement the related interface;
4, the expansion of strong, different layers responsible for different levels;
5, High security. Each layer can access the specified resource only through the specified portal;
6, the project structure is clearer, the division of labor is more clear, conducive to later maintenance and upgrade
Disadvantages:
1, reduce the performance of the system. Without a tiered structure, many businesses can access the database directly to get the data, and now they have to do it through the middle tier.
2. Sometimes cascade changes are caused. This kind of modification is especially reflected in the top-down direction. If you need to add a feature in the presentation layer to ensure that the design conforms to the layered structure, you may need to add code to the appropriate business logic layer and the data access layer
3, increase the complexity of the system, thereby increasing the workload
Second, the MVP structure:
Advantages:
1. Have the advantages of three-layer architecture;
2. Front-end developers and back-end developers can be separated (as long as the iview interface can be met) and synchronous development;
Disadvantages:
1. Reduce the performance of the system;
2. Sometimes cascading modifications are made, and if the model business models have changed, then the presenter that depend on it may also have to be changed;
3. Increased complexity of the system, resulting in increased workload
Third, the MVC architecture:
Advantages:
Pending additions
Disadvantages:
Pending additions
Iv. DDD Domain Driven design architecture
Advantages:
Pending additions
Disadvantages:
Pending additions
Simple diagram of System architecture