Big talk three-tier architecture, three-tier architecture

Source: Internet
Author: User

Big talk three-tier architecture, three-tier architecture
Scenario

This blog post is not worth mentioning for experts. It is only a small suggestion for beginners. What is the three-tier architecture to help new people understand ]? Why is the layer-3 architecture used?

This blog is not related to use, and is intended to help you understand it. The editor will try its best to make the text interesting.

1. How do we think of a three-tier architecture? 

Now, let's start the first topic today. How do the programmers in the program world think of a three-tier architecture? In fact, this question is well answered. The emergence of any technology and thinking must be aimed at solving some problems. With the severity of the problem, the methods, techniques, and methods for solving the problem are as follows. To be extended. That is to say, we assume that programming encounters some troubles when there is no three-tier architecture. The emergence of a layer-3 architecture solves these problems.

What is the problem?

2. Li youzi's troubles (it has nothing to do with programming a dime) 

1) Once upon a time, someone suddenly had some money. (The Boss is Li youqian)

So he decided to open a snack bar. Be your boss!

2) So he decided to recruit three employees. The recruitment conditions are as follows.

"Three employees are recruited at the snack bar: simple work and good treatment. Responsible for food purchase, cooking, and serving. Monthly salary: ¥500 ".

It wasn't long before three Tom came to apply for a job. He worked as a rich Li employee and the snack department was operating normally.

Xiao Ming buys food every day → then stir-fry → then cook.

Xiao Ming's food is delicious, and the food price is affordable. Rich snacks are booming.

3) with the booming business in the snack bar. As more and more people come to eat, the cost of buying food has become a big problem.

Li has the money to make a fortune and spent 5 yuan to buy 3 books for James at the stall.

The snack bar is temporarily suspended.

James worked hard to learn. James slowly found that he had learned so much about buying a dish.

A year later, the crisis of food purchase gradually passed ....

4) Later, the customer began to respond to Mr. Li's boss. The image of the waiter serving food is too bad, especially the height is too short.

Affects meals.

Despite the delicious stir-fried dishes, James had to be dismissed by three people. Recruit again.

"Recruiting employees in the snack bar requires proficient in purchasing, cooking, height over 160cm, and good facial features. High Salary, good treatment"

The snack bar is closed.

Summary)

I don't know. What problems do you see in such a nonsense statement?

If Li has a lot of money to manage.

Employee food is not good. No matter how good the service is, the employee is dismissed for a new employee.

Employee service is not good, dismissed for a new employee, no matter how delicious the employee's cooking is.

 

During the operation of the snack bar, no matter which part encounters any problems, the whole snack bar will be affected.

The snack bar had to be adjusted as a whole.

In general,So much work cannot be done by one person. Once something goes wrong, we can only quit

 

This problem naturally exists in the program world. Data exchange with databases, data processing, and front-end display.

If all of these jobs are handed over to a piece of code for processing, the problem is the same as that of the rich food department.

No matter which part of the code is faulty, We must modify all the code.

 

3. We need a clear division of labor 

In fact, in the real world, rich recruitment should be like this.

Recruitment: purchase 1

Chef 1

Attendant 1

Only when the division of labor is clear can we make the best use of things.

The cook has a problem. Ask the cook...

In fact, procurement, chefs, and waiters are three layers of architecture in our lives.

Seriously

1.L3 Architecture 

A three-tier architecture usually divides the entire application:

Presentation layer and attendant

Business Logic Layer and chef

Data access layer procurement

Hierarchy is the division of labor, so that some changes affect the other part as little as possible. In the line of Software Engineering: this is the idea of "high cohesion and low coupling. In software architecture design, the layered structure is very common.

In fact, it is not necessarily three layers, or N layers. Similar to the division of labor in life, different services have different division of labor. This is related to the program logic.

2. I want to know what is going on later. 

Today, I just spoke about it. It's about to be related to the program. So.

PleaseRecommendation, PleaseShare.

 

 

 

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.