(ext: http://blog.csdn.net/lfsf802/article/details/8487990#comments)
In the study of software engineering, the first time to contact the concept of architecture. At the time of contact with the understanding of it is very shallow, because the engineering experience is relatively small, for such a deep-seated concept is still vague unclear.
With the depth of study, began to touch the design pattern, that is, the book that I Love Programming-"Big talk design Mode", the book of the side dishes and the clear dialogue of large birds, let me like the immersive, 1.1-point layer of progressive understanding of design patterns, understand the object-oriented design principles of pride. After a long period of study, the profound discovery of the charm of design patterns, but also feel the beauty of the art of programming.
After that, I began to learn the SSH framework, the first time I felt the ease of use of the framework, and once again, the intelligent people made programming easier, but also the wisdom of the people of lazy perseverance and desire.
In fact, the previous study, the relationship between the three things is really not very clear, always feel they are very similar, but not too well to say clearly the relationship between them. Now with the continuous learning, continuous accumulation of experience, but also the relationship between the three have a clear understanding. Let's summarize the relationship between them.
1. Concept
Architecture: A simple architecture is a blueprint, a design that abstracts the different requirements of a customer into an abstract component, and describes the communication and invocation between these abstract components.
Framework: Software framework is an architecture that extracts the common parts of specific domain software during project software development, and the software projects in different fields have different framework types. The framework is not a ready-to-use application system. It is a semi-finished product that provides a number of services that developers have developed two times to implement specific functions of the application system.
Design pattern: is a set of repeated use, most people know, after the purpose of classification, code design experience Summary, it emphasizes a design problem solving method.
2. Framework and structure relationship
First of all, the framework is not architecture, it should be said that the framework is more specific than architecture, more technology-oriented, and architecture is biased towards design. Another relationship is that architectures can be implemented through a variety of frameworks.
3. Relationship between frame and design pattern
The design pattern is the design idea and solution for a single problem, a pattern can be applied to different frameworks and implemented by different languages, while the framework is an application architecture, a mixture of one or more design patterns and code, although they are different, but work together to make people's design can be reused, There are some characteristics of unity in ideology, so the thought of design pattern can be applied in frame design.
4. Architecture and Design pattern relationship
The relationship between the two is very well differentiated, the design pattern is mainly aimed at a single problem of the solution, the category is relatively small, and the architecture is a high-level approach to the architecture of a design idea, category is relatively large. As you can say, multiple design patterns may appear in a schema to solve problems in multiple architectures.
5. Summary
Through the above analysis, we can know the difference between them or there are many, first of all, the architecture should be a category of the largest concept, is the highest level of design. In an architectural design, multiple frames and multiple design patterns may be used, and the framework is a semi-finished product that is abstracted from the generality, and the design pattern is the design idea and solution to solve the single problem.
So the first thing we do when we're working on a project is the architecture, the overall design of the whole problem, and then we'll consider what kind of framework and design pattern to use to implement our architecture; Of course, using only one of the frameworks and design patterns is often encountered.
All of them have common ground to solve real-life problems, and in architecture design and framework design and design patterns will show that "high cohesion, low coupling" concept; so what they have in common is to make our designs more object-oriented.
So we want to do a good project, then the architecture design, framework design and use, design patterns is very important.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Schema, framework, and design pattern relationships (goto)