Three-layer Model summary (i)

Source: Internet
Author: User
Objective

This blog is a general summary of the three-layer model, specifically about what is a three-storey structure, why there are three-layer structure, three-layer structure of the three layers, three-layer structure of the application scenario and the use of three-layer structure of the advantages and disadvantages.

Content

What is a three-layer structure?
The three-tier structure we are discussing is logically divided into three layers, and the three-tier structure is actually dividing the entire business application into three layers.
Why should there be a three-storey structure?
The purpose of dividing three levels is to achieve "high cohesion and low coupling".
Classification of three-layer structures.
According to the hierarchical structure recommended by Microsoft, from top to bottom are: data access layer, business logic layer, presentation layer.

Three-layer structure of the application scenario.
Complex business logic, both the data access layer, and the business logic layer, only need to use three-tier structure. A three-tier architecture is not required for simple business logic, or without a real data storage layer.
The pros and cons of using a three-tier architecture.
Advantages:
1. A developer can focus on only one of the layers in the entire structure
2, can easily use the new implementation to replace the original level of implementation
3. Can reduce the dependence between layer and layer
4, in favor of standardization
5. Facilitate the reuse of all logic
Disadvantages:
1, reduce the performance of the system, if not adopt a layered structure, many businesses can directly visit the database to obtain the corresponding data, but now must be done through the middle tier
2, sometimes cause cascade modification (cascade is the parent change children also change). This change is also reflected in the top-down direction, if you need to add a function in the presentation layer, in order to ensure that the design conforms to the layered structure, you may need to add the corresponding code in the corresponding business logic layer and the data access layer.

Summary

Now understand is relatively shallow, slowly will be through to practice to experience, there are specific three levels is what to do please look at the following, if you feel good on the manual point of Praise ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.