First chapter introduction
First section mode
"Simply, the mode is a real thing that appears in the world, and it is also a rule that tells you how to create a real thing. It should be created. It is both a process and a real thing; it is also a description of the current real thing, it is also Description of the process of creating physical objects. "
- "The eternal way of architecture"
In software science, with the development of theory, the model is subdivided into a variety of software management models, and the practice proves is different from traditional management, making it a new model. Software analysis mode, software design mode, process mode, software reconstruction mode, etc. The design model is the core, the most important model. In the usual theoretical books, the design mode is generally referred to as mode. Hereinafter, you can know the mode to solve or universal modes through the context environment.
So, in software science, what is the mode, can you completely borrow the C.alexander defined mode? Some people say that the software is born with buildings, you have an embarrassment, and there is a number of minds. In fact, the GOF book already shows that in essence. However, the specific software field is different. It is a pity that because the software model theory has been in development, the recognized definition is not yet available. But there are several classic statements. It is said that the mode is a question in the situation that is confirmed by a program. This definition is relatively simple, concise. The mode in the book of Gang of Four is defined as three-segment value: indicating a specific situation, problem, and the relationship between the scheme. The famous 23 modes (C language description) are described in this way. The author of "J2EE Core Patterns" has also made a similar definition: mode is used to describe the problems exchanged and their solutions. It is parsed in 15 J2EE mode with the introduction steps similar to the GOF book. Other books of the introduction mode, the paper and the website also have its own mode definition. But all of the definitions in the GOF book and generally introduce it as a blueprint.
The second festival chasing mode
The mode in the software originated from the building, but as Gang of Four said in "Design Mode": Although Alexander refers to the city and architectural mode, his thoughts are equally applicable to object-oriented design patterns. Just in an object-oriented solution, we replace the walls and doors with objects and interfaces. The core of the two is to provide a solution for related issues.
In fact, we live in a model-filled world - of course, simple and affirmative premise is that our world is orderly. In addition to mad and metamorphosis, modern people are hard to wear clothes; most people eat three meals a day, and of course a day; in society, we belong to a community or group, participate in political, economic activities; In all activities we participate, we all act in accordance with certain rules; people in the edge of the rules always want to join the ranks of the rules, just like our China and Russia has always insisted on requesting to join the World Trade Organization. Eating, dressing, sleeping is our basic life requirements of our humanity; each of us must abide by, if a person does not dress, do not eat, there is no other conclusion, he does not belong to humanity. Participating in the community, in a certain framework, social and economic activities are incorporated in human beings.
In fact, in Chinese traditional, it is more paying attention to the model, such as Peking Opera, one trick has a set of routines; if there is a set of Chinese painting formats, how to paint, there are several paintings; another kind of "Sun Tzu" - it can say It has become a common mode for "war" in all aspects. He tells you what array in any military environment, however, how to spell, you will rely on your own understanding and flexible application. Thus, the creation mode is the master of the master, but people who are in these models can only be called craftsmen. Of course, for the meaning of the mode, it is either integrated, or it is ignorant, they should first become a craftsman. Just as our China, at this stage, it is to actively participate in the development of the rules of the international community and economic activity. Use the traditional virtues and wisdom of the Chinese nation with the Chinese nationality, domestic socio-economic communication methods, and reconstruction is conducive to all humans. Social and economic activity rules for continuous development. The visible mode is inexpensive, and the model is a habit of habits. The mode in culture is the accumulation of history. The mode of learning is the sublimation of experience. Software science mode is the unity of practicality and theoretical.
Section III Learning and Research Design Mode
1. Why learning and research design model
So why do we learn mode in software? What benefits have been brought to us, so many people are passionate? In fact, the truth is the same - we all need to learn from the master's experience, standing on the shoulders of the giant to better travel. Especially in the engineering field, this is more important. Secondly, learning models can take less to learn and develop software, so that our learning is strict from the beginning. The developed software can also be more SCALABLE and REUSABLE to provide stronger maintainability, shorter development life cycles. Know the pattern, the research mode can also make us develop more smooth, more modular, and reduce coupling. One term is to reduce internal stress, and the internal stress of rational discovery software can make the software system long. If the decomposition pressure in the building structure is generally, if the structure is unreasonable, the pressure decomposition is uneven, the building is likely to be soon or leak or collapse. To make new buildings, new software does not leak within a certain period of time, it is the basic reason for our learning model; it is possible to make our buildings, software for a long time, is what is like this to attract our charm.
2, how to learn and study design patterns
It is also necessary to sprout the model development process from the building, let's take a look at the "three steps" professor of Christopher Alexander:
• Theory of research model - "The Eternal Road of Architecture"
• The first complete mode language - "Building Mode Language"
• Rational use mode to guide construction processes - "Oregon Experiment"
This article is a research on design patterns. The design pattern is first referred to by architecture designer Christopher Alexander in the A Pattern Language: Towns, Buildings, Construction (Oxford University Press, 1977). He introduced this concept and is called model - the abstract solution for repeated design issues - this concept attracts the attention of some researchers in other fields, especially in the middle and late 1980s, those developments Object-oriented software personnel. It is worth noting that research on software design patterns has created a letter to object-oriented books: Design Patterns: Elements of Reusable Object-Oriented Software (ie, "Design Mode", " Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides are incorporated. These authors are often referred to as the "Gang of Four", and many people also joked "four-person help", and this book is called "Four Group / Gang (or GOF)" book. Under this classic mode theory, you can peek the essential importance. The usual step should be: First of all, we must understand the design mode. Everyone who is close to her will be called by her charm. This will transition to again: system learning design mode, after learning, and after learning, we must do it in the project. It must be pointed out that it is necessary to implement the specific environment when the final practice design mode is implemented, using a language, which is limited to a particular environment requires courage and change, and the paper talk is helpless. This article is an analysis and practice in the J2EE environment.