Don't get lost and recognize the architecture, framework, and model

Source: Internet
Author: User

The beauty of software architecture is critical to the loss of many people. The relationships and differences between architectures, frameworks, and models are unclear, and misunderstandings of architectures and frameworks are common.
In. I am not a master with profound skill, but I have more or less gained my own experience and insights in this field. I have also been lost and sunk in the face of design. Only by sticking to this design can you give up the settings as appropriate.
Thinking, can jump out of hell, experience the joy of heaven. This article aims to briefly help you differentiate architectures, frameworks, and models, and join us in the design paradise to feel the beauty and elegance of design.

First of all, the architecture in this article refers to the software architecture.

I. Framework)


Many programmers, from getting started to getting familiar with it, will begin to have a strong interest in the architecture, framework, and so on, in addition, it is often because of the usage of the frameworks developed by experts through accumulation.
These frameworks often solve basic business problems and development and maintenance problems. Then, this set of semi-finished products used for development is not an architecture
(Architecture), but the framework ). In a more simple and clear statement, a framework is a set of semi-finished software systems and a set of code (sometimes including some general-purpose
The number of database tables or other shaped designs of the business ). The architecture is not code, it is a solution, it is a combination of solutions to problems, which will be discussed later.

Let's talk about the frameworks, such as struts, spring, and hibernate, which are well-known open-source frameworks. They are semi-finished software designed to solve problems for some applications. For example
Struts is designed for front-end development and is a good solution implemented by MVC. Spring has a wide range of solutions, and its Web components are also used for front-end development, while IOC
Containers are used to solve the decoupling and separation between objects. AOP is used to solve the coordination problem between object methods without knowing it. Of course, spring is still persistent,
Specialized components for caching and transactions are obtained through integration with other well-known frameworks. In this way, we will find that when we want to solve a certain type of problem, we do not have to write code from scratch.
We have encapsulated a set of solutions and provided APIs for our use. In short, the framework is not a ready-to-use application system. It is only a semi-finished product and requires subsequent developers to perform secondary development.
Body Function application system.

So why are these frameworks so well designed? They are excellent in that, on the one hand, they solve problems in a certain field (or multiple fields) well, so that we do not start from scratch; on the other side
It is also because they have better performance than other methods that also solve this problem. I think a well-encapsulated framework will not be pursued if its performance is poor. Truly encapsulated framework,
We don't have to worry about how this framework is actually generated. We only need to call the API to complete our development. This is a convenient framework. To design such a framework, we need to have ideas, ideas, and settings.
. But we solve a problem through some method or idea, which is the design pattern. See the following.

2. Design Pattern)


Through the introduction of the above section, we can understand that the design pattern is not code, it is just an idea and a solution to the problem. Most people think that the design pattern is code.
Code is just used to express your thoughts and express abstract thoughts in a living image of code. The patterns and frameworks are two different aspects of software design.
Research area. However, in order to get an excellent framework, we always need to find ways to abstract the design, in order to achieve reusable, easy to maintain, low coupling and other goals, so we need to use appropriate models
Line design, and then use the code for implementation.

Of course, the role of the design model is not just to design the Framework, so understanding is too one-sided. The Design Pattern provides a solution to a single design problem, and this solution can be used in different applications or
Framework. The design pattern is just a simple design, which can be implemented in different languages and can be reused in different applications. The framework is a mixture of the pattern and code.
Users can expand the framework in various ways to form different applications.

However, our development is not guided by models and frameworks. We need to follow different conventions in different application development scenarios, these protocols include the overall structure, hierarchy, collaboration between different parts, and functions.
Boundary, system performance processing, appropriate technology selection, framework usage, pattern application, distribution, code specifications, and so on. Any one of these factors is very important.
Became our development statute. In view of these factors, an architecture is proposed to solve the problems in application development.

3. Architecture)


This may not be clear enough. The academic point is that the architecture includes a series of components, relations between components, and component interfaces, which reflect the decision-making on the Basic Principles. The architecture is the system organization of the software system,
It is the sum of decisions made on system components, such as interfaces, behavior patterns, and collaboration relationships. It involves not only the structure and behavior, but also the use, function, performance, adaptability, reusability, and availability of the system.
Understanding, economic and technical constraints, and aesthetic considerations. Generally, the architecture of a software system has two elements:
· It is the highest level of division of a software system from the whole to the part.

A system is usually composed of components, and how these components form and interact with each other is an important information about the structure of the system. Specifically, the architecture components should be included.
(Architecture
Component, ctor, and task flow ). The so-called architecture element is the core "brick" of the system, which is described by the connector.
The path of communication between components, the mechanism of communication, and the expected results of communication. The task flow describes how the system uses these components and connectors to fulfill a certain requirement.
· The highest level of commercial and technical decisions made by building a system that will be difficult to change in the future.
There are many important decisions that need to be made prior to building a system. Once the system starts to be designed or built in detail, these decisions are hard to change or even unable to be changed. Obviously, such a decision must be the most important decision on the success or failure of system design and must be carefully studied and investigated.

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.