Architecture Talk (1): What is Architecture?

 Architecture Talk is a series of columns written by senior architect Kevin Wang. Based on Kevin's experience in architecture, the column will gradually discuss what architecture is, how to do it well, how to implement software architecture, and how to write programs well. The purpose of the column is to throw out some opinions and make everyone think. If you have feelings or new insights, please contact Gary (WeChat greenguolei), the head of the column, for a deep chat.

  This article is the first of a column on Architecture. The author will introduce what architecture is and why it occurs by analogy.

  Origin For a

  long time, in the software industry, there have been many debates about what architecture is, and everyone has their own understanding. Even when many architects talk about architecture, they start to talk about application architecture, hardware architecture, data architecture, and so on. I have also looked everywhere for the definition of architecture, and I have consulted many people, but I found that there is no definition that everyone agrees with. To paraphrase a popular joke about big data, it also applies to architecture:


Architecture is like teenage sex, everyone talks about it, nobody really knows what is it.

  In fact, architecture existed many years before software was invented, and the word first appeared with architecture. Therefore, I think it is necessary to start from the source and discuss the concept of architecture clearly. Only in this way can the discussion of architecture in the software industry be meaningful.

  What is schema?

  The English of the architecture is Architecture. On Wikipedia, the architecture is defined as follows:


Architecture (Latin architectura, from the Greek ἀρχιτέκτων arkhitekton"architect", from ἀρχι- "chief" and τέκτων "builder") is both the process and the product of planning, designing, and constructing buildings and other physical structures.

  From this definition, architecture seems to be a process, and it is not very clear. In order to clarify this problem, let's first look at why the architecture occurs.

  Why do structures arise?

  Imagine that in the earliest days, everyone lived completely independently, with clothing, food, housing, and transportation all handled by themselves. The entire human race was an independent individual and did not interact with each other. In order to solve the problem of the continuation of human beings, it is natural for men and women to live together in groups. At this time, there is a division of labor. There will be a certain division of labor in what men and women do. However, the basic needs of people's daily life have not changed. and other necessities of life.

  But once many people work together as a whole for survival, the power becomes much stronger, so ethnic groups are naturally formed: some people are good at farming, some people are good at making tools, some places are suitable for producing food, and some places are suitable for producing cotton And so on, it naturally formed the grouping of people and the grouping of regions. When division of labor occurs, everyone is actually more productive because everyone is doing what everyone is good at.

  The entire population is enhanced in productivity and resistance to the environment. why? Because everyone's ability and time are limited, and because of the limitations of human structure, people can only concentrate on doing one thing well at the same time, which leads to division of labor. Now that the division of labor has occurred, it turns out that one person does all the things necessary for survival. It has become a lot of roles with different divisions of labor to cooperate to complete these things. These people must be combined through some mechanism, so that everyone can complete the tasks of survival. Necessary things, which actually lead to the transaction (the part of the transaction will not be expanded here, there is a chance to discuss it).

  When everyone has to complete the production of all the necessities of life by themselves, there is no structure (of course, individuals can only do limited things at the same time, and there may still be a structure in time). Once the division of labor is generated, all things are divided into people with different roles to complete, and finally through transactions, so that each individual has the necessities of life, and each individual does not need to do all the things, just need each individual Individuals can do what they are good at and have a certain trading ability.

  This actually forms the structure of society. So how do you define an architecture? Take the above example as an example, divide a whole (complete all the work of human existence) into different parts (division of labor), and complete these divisions of labor by different roles, and establish a mechanism for different parts to communicate with each other, so that these parts can be organically The integration of the whole into a whole, and to complete all the activities required for this whole, this is the architecture. From the above examples, the power generated by the architecture can also be summarized:
1.
The work that must be performed by people (without human intervention, it means that there is no need for transformation, and there is no need for architecture)

2.
The ability of each person is limited ( Everyone has their own strengths, personal output is limited by the shortest board, and due to the limitations of human structure, they can only focus on doing one thing well at the same time, for example, although they have two eyes, they can only focus on one thing at the same time. For things, there are two hands, and they cannot do different things at the same time. ps. Although a small number of people can draw a circle with the left hand and the right hand, it is not a common phenomenon)

3.
Everyone's time is limited (in order to reduce the investment of time, it will inevitably lead to the decomposition of work and complete it for roles who are good at these tasks, see 2, thus shortening the time)

4.
People have higher requirements on the target system (if If you are satisfied with the status quo, there is no need to carry out the architecture.)

5.
The complexity of the target system enables a single person to complete the system and satisfy conditions 2 and 3 (if the individual can complete the improvement of the system, no other person is required to participate, and the There is no need to involve architecture, just craftsmen, and generally this work does not require urgent time. When you are skilled enough, you will have a certain amount of architecture thinking, but more consideration is how to improve quality and improve personal time efficiency )


  Some people may challenge that if one decomposes the target system, such as someone builds a house, purchases materials, and builds it, isn't it an architecture? This can happen if it is not time-sensitive, but in this case, it does not necessarily lead to the occurrence of the architecture. If there is enough awareness and enough proficiency, architectural thinking will also arise, because it is helpful to increase productivity, shorten the construction time, and improve the quality of the house. In fact, the architecture of the building is a practice accumulated after a long period of these activities.

  When these five conditions are met at the same time, a structure will be produced. From this level, architecture is a method of human development, from ignorant and passive understanding of the world to active understanding, and to transform the world with higher efficiency. Let us take the building as an example to strengthen our understanding.

  At first, humans lived in caves and trees, mainly to avoid the attacks of other beasts, and to reduce changes in the natural environment and challenge human survival. In order to accomplish these goals, humans began to learn to use trees and leaves to build facilities for isolating spaces on the flat ground, which is the beginning of architecture. However, complete isolation also has many disadvantages, and facilities such as doors and windows have gradually emerged.

  The essence of architecture is to draw out an exclusive space from the natural environment, but it can still communicate with the natural environment through doors and windows. At this point the architecture has already started. Divide the space on the earth, and maintain organic communication with the earth and space through doors, windows, foundations, etc. When humans began to learn to use fire, the inside of the hut would naturally be divided into two parts, one for cooking and the other for living. When human excretion is slowly moved into the room, the toilet will slowly appear. This is the division of space inside the building.

  At this time, people's demand for architecture will gradually increase, and there will be many kinds of space divisions, and there will be many ways of combination, such as the house where each person lives, and the religious nature of group living. houses, houses for collective activities, etc. At this time, people began to design houses consciously, and architects gradually appeared. Everything is to meet the higher and higher needs of people, improve quality, reduce time, divide space more efficiently, and allow more organic communication between spaces. This is the architecture of the building and the evolution of the architecture of the building.

  To sum up, what is architecture is:
1. Define the boundaries of the target system according to the problem to be solved.
2. Divide the target system according to a certain principle. The principle of segmentation is to facilitate different roles to work on the segmented parts in parallel or in series. Generally, parallelization can reduce the time.
3. Establish a communication mechanism for these divided parts.
4. According to 3, these parts can be organically linked, merged and assembled into a whole, and complete all the work of the target system.

  The same thinking can be extended to other industries, such as enterprise structure, national structure, organizational structure, music structure, color structure, software structure and so on. To paraphrase a sentence from the Romance of the Three Kingdoms, long-term unity must be divided, and long-term separation must be united. Architecture actually refers to the practical activities that people actively and purposefully identify the problem according to their own understanding of the world in order to solve a problem, and then decompose and merge to solve the problem. The output of the architecture is naturally the analysis of the problem and the solution to the problem: including the principles and reasons for splitting, the principles and reasons for communicating and merging, as well as splitting, the parts that are split and the roles corresponding to the merger and core competencies required.
Reprinted from: http://kb.cnblogs.com/page/539160/

Several websites most frequently visited by senior Java developers
http://www.iteye.com/news/32979

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326972075&siteId=291194637