Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the ways of thinking you need to understand in architectural design?

2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something from it.

Architectural design is an art.

If a good programmer wants to be a good architect, he should change the way of programming and learn to use the way of architectural design.

There are several ways of thinking about architectural design:

1. The way of thinking of divide and rule

Divide and rule is a way of thinking that makes a general and vague matter clear and a complex one simple. And this is the primary goal of our architectural design.

Architects must learn to decompose the architecture, decomposing the functional and non-functional requirements of the software at multiple levels of the architecture.

The timing of architecture decomposition should be appropriate, do not decompose prematurely or over-decompose, and the usual time to decompose is when the architecture is constructed and evolved.

Architectural decomposition should follow the following principles:

High cohesion and low coupling.

Hierarchy. The order of decomposition is generally the system → subsystem → module → component → class.

Principle of orthogonality. The decomposed schema elements conform to the principle of orthogonality.

Principles of abstraction. The decomposed architectural elements should be the result of the architect's abstraction.

Principle of stability. Stable schema elements should be made independent of unstable schema elements.

Principle of reusability. Architecture design should be the same as software, to consider reuse and reusable design.

two。 A way of thinking that comes together.

The purpose of divide and conquer is to reduce the difficulty, but the design and implementation of the software is ultimately to combine the decomposed elements together. Therefore, we should not decompose for the sake of decomposition, and we should also consider the future integration in the process of decomposition. After all, if the decomposed content cannot be integrated, no matter how detailed the decomposition is, no matter how clear it is, it doesn't make any sense.

3. The mode of thinking of the separation of movement and movement

The thinking mode of dynamic and static separation requires the separation of static resources and dynamic resources in the system, while paying attention to the architecture design of the combination of the two. Because dynamic processes and use cases cannot be done on their own without static data and classes.

4. The way of thinking of reuse

Reuse is the best software engineering practice, there is no one. Reuse can bring us the following benefits:

Higher productivity.

Higher system quality.

Improve the maintainability of the system.

Therefore, we also need to use reuse thinking in architecture design to extract the common functions needed by each module into reusable common components.

We can divide reuse into conventional reuse and system-level reuse.

Among them, conventional reuse can be divided into code reuse, algorithm reuse and data structure reuse; system layer reuse can be divided into design reuse and analysis reuse.

5. A hierarchical way of thinking

Layering is the process of rebuilding each architectural element through layering, and each layer should be designed independently and loosely coupled.

A hierarchical way of thinking enables software architecture to have the following advantages:

Developers can focus on only one layer.

The implementation of the original layer can be easily replaced with a new implementation.

You can reduce the dependency between layers.

It is beneficial to standardization.

It is beneficial to the reuse of logic in each layer.

6. Mode of thinking

Architecture pattern is a set of mature, general-purpose and reusable solutions. In architecture design, architects should be able to select the most suitable architecture pattern according to business requirements.

The architecture patterns generally include hierarchical mode, client-server mode, master-slave device mode, pipe-filter mode, proxy mode, P2P mode, event bus mode, MVC mode, blackboard mode and interpreter mode.

7. An abstract way of thinking

Abstraction includes two levels: one is to sum up the implementation of various similar scenarios into a rule or method for future design; the other is to summarize the common content in non-similar scenarios and further abstract into something similar.

8. A structured way of thinking

Structuralization is a way of thinking that pays attention to structural integrity, which emphasizes that integrity should be considered in the process of analyzing problems and do not get caught up in details immediately. The core of structured thinking is to classify the constituent elements of the problem reasonably and analyze the key links on the basis of the correct definition of the problem (from the end to the beginning).

Structuring should follow the following principles:

Start with the end.

Know the goal of the design and reverse the work and tasks that need to be done according to the goal.

Don't get preconceived and avoid getting caught up in details.

The architectural elements are independent of each other.

There are no missing elements of the architecture.

Iterative way of thinking

There is no best, only better. Architecture design also needs to iterate and evolve as business requirements change.

This is exactly:

Architecture design is not simple, the way of thinking for half a day to learn the experience of our predecessors, excellent architecture is no longer ugly to finish the above content is helpful to you? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report