Layered development ideas and small steamed bun

Source: Internet
Author: User
Breakfast in the morning, sudden inspiration, combined with the eating of small dumplings and daily development experience for a layered application.

First of all, talk about what is a three-tier architecture, the so-called three-tier development is to divide the entire business application into the presentation layer-the business logic Layer-data access layer-database, and some more fine, clearly the client's presentation layer, business logic access, and data access and database access, very conducive to system development, maintenance , deployment, and scaling.

Software to layered, in fact, summed up a word, is to achieve "high cohesion, low coupling." Using the idea of "divide and conquer", the problem is divided into various solutions, easy to control, easy to extend, easy to allocate resources.

What are the advantages of this three-storey structure?

  1. The cost of application system development and maintenance is greatly reduced by dividing the whole system into different logical blocks.

The three-tier structure will represent part and part of the business logic separated by the client tier and the application server, and communication between the client and application server, application server and database server, and data exchange between heterogeneous platforms can be achieved through middleware or related programs. When the business logic of the database or application server changes, the client does not need to change, and vice versa, which greatly improves the reusability of the system module, shortens the development cycle and reduces the maintenance cost.

  Fun to understand:

Let's say that the hotel does the small cage bag:

A layer of steamed dumplings,

A layer of meat bag,

A layer of vegetarian bags.

First this way we can make steamed buns into different groups, to be responsible for making different buns. When each kind of steamed bun is done, they can easily know which cage to put in, not to see where to put it, we can easily put the Tororo on the fire, without affecting the other cage heating. When we want to eat meat bags or steamed dumplings, we can easily find what we need, very save time and energy. Removing or increasing the meat bag or steamed dumpling does not affect the heating of the vegetarian package.

What do you think would happen if we put all this in a big cage? will be very messy, maintenance is a waste of time, not only to find trouble, and its every time to uncover the pot will have an impact on the other.

  2. The data access and logical operations are centralized into the components, enhancing the reusability of the system.

For example, by centralizing data access into components of the data access layer, which reduces duplicate code in the application, each form that needs access to the database and table uses the same components.

For example: Some common logical operations are encapsulated in the components of the logical layer, each operation that uses the method can be shared to access the component.

  fun to understand:

Simply understood, the Tororo itself is an example of reuse, and if we use a disposable cage (like a disposable chopstick), it will waste much manual work (repetitive writing), and there will be a lot of wasted resources (code redundancy), and finally garbage disposal (post-maintenance). And if the pot of Tororo and the fire is done by a specification and standard (interface), such Tororo can be used not only here but also elsewhere. (though it's not quite clear, it's easy to understand)

  3. The scalability of the system is greatly enhanced.

Modularity makes the system easy to expand in both portrait and horizontal two directions: on the one hand, the system can be upgraded to a larger, more powerful platform, while also increasing the scale to enhance the network application of the system. The distribution data processing is possible because of the limitation of system isomorphism. When expanding or modifying the function, the stability of the original structure will not be destroyed.

  Fun to understand:

With the needs of customers, we now need to add new varieties, such as steamed steamed bread, steamed sweet potatoes, then directly can add a layer of cage is, the other cages will not have any effect.

The role of three-layer structure in building competitive advantage of enterprises is mainly embodied in the modular design, which enables the users to expand the system based on the existing structure, thus improving the speed and business level of enterprise informatization, and the emergence of middleware in three-layer structure allows users to choose the right product to build the system directly from the market. The development cycle and development costs are greatly reduced.

But the hierarchical structure also has the disadvantage is not the more the better, so management many layers will be troublesome, the operation efficiency may be lower. Therefore, a system with a good hierarchical structure, the number of layers to be just right.

Related documents: three-tier architecture and pig farming

Related Article

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.