Methodology for front-end architecture design

The architecture of the system is designed to define the basic characteristics and behavior of the application.

  • A good architecture is the key to the success of system construction.
  • Architecture drivenSoftware development is the most efficient way to build complex systems, and architecture-driven approaches are superior to requirements-driven, document-driven, and methodology-driven (the ability to reason abstract).Although methodology (the ability to reason abstractly) can help us achieve project success, it is not the decisive factor.

1. How to design the architecture in the early stage

Core to all architectures: separation of concerns (separation of roles and functions, resulting in a high degree of abstraction of specific functions).

The process of architectural design is to identify, encapsulate, and manipulate concerns as requirements are combed through.

According to Demeter’s law and the open and closed principle, the separated objects of responsibility should be highly independent and closed (the advantage is that there is no need to worry about their internal implementation, only the input and output).

It is easier to construct effective roles and powerful models, making it easier to develop, test, manage, and maintain.

2. Steps to build the system

Abstract the interaction between responsibilities (functional modules)

Abstract the relationship between responsibilities and data flow

3. Four points to note

1. Scalability

Whether functionality and business can be easily extended without modifying the structure.

2. Elasticity (scalability)

As the complexity of the system increases, whether it can continue to support the requirements under the premise of good scalability.

3. Flexibility

Whether it can be done quickly and easily under the premise of extending the current architecture. It’s usually about anti-vulnerability.

4. Stability

Acceptance of requirements and changes, and tolerance for anomalies.

4. Evaluation criteria

1. Flexibility

The ability to respond to changes in the external environment, the ease of making changes in the architecture, and the tight coupling between functional modules are key to reducing flexibility.

2. Easy to deploy

3. Easy to develop

4. Testability

Division of responsibilities and data flow to facilitate block testing.

5. Scalability

Whether the system is scalable, tight coupling and unclear responsibility division are the key to reduce scalability.

6, performance,

The essence of any architecture is to deal with data flow, so the efficiency of the flow of data determines the performance of the architecture.

The last

In fact, the viewpoints proposed in this paper also belong to the methodology of architectural design. After mastering and skillfully using these methodologies and putting them into practice in projects, a better architecture will be built gradually.

Ps: BECAUSE I am lazy, I did not make specific explanations and examples for some nouns.