Introduction of software architecture C4 model

Time:2021-7-22

Introduction of software architecture C4 model“C4 model”:

representativeContext, container and componentandCode——A series of layered charts can be used to describe different scaling levels of software architecture, each chart is suitable for different audiences.

c4-overview

To create a map for code, we first need a set of general abstractions to create a ubiquitous language to describe the static structure of software system. C4 model usagecontainer(applications, data storage, microservices, etc.)assemblyandcodeTo describe the static structure of a software system. It also takes into account the people who use the software system.

abstractions


Examples

The first layer is the system context diagram, which shows the software system being built and the relationship between the system and users and other software systems.

image

The second layer is a container diagram, which enlarges the software system and displays the containers (applications, data storage, microservices, etc.) that make up the software system. Technical decision-making is also a key part of the diagram. The following is an example of the container diagram of the Internet banking system. It shows that the Internet banking system (virtual wireframe) consists of five containers: server-side Web application, client-side single page application, mobile application, server-side API Application and database.

image

The third layer is the component diagramTo enlarge a single container to display its components. These components map to real abstractions (such as a set of code) in the code base. The following is an example of component diagram of a virtual online banking system, showing some (but not all) components in the API Application.

image

Two spring MVC rest controllers provide access points for the JSON / HTTPS API

Layer 4 code
Finally, you can zoom in on individual components to show how they are implemented. The following is an example of UML class diagram of a virtual online banking system

image

C4 model does not predefine any specific symbols. In these example diagrams, you can see simple symbols, which are suitable for whiteboard, paper, note, index card and various chart tools. You can also use UML as a symbol, and use packages, components, and prototypes appropriately.

C4 model is a simple way to communicate software architecture at different levels of abstraction, which can tell different stories to different audiences. It’s also a way to introduce (and often reintroduce) rigorous and lightweight modeling to software development teams.

In Java, there is a tool to help us test architecture with code drivenArchUnit in Java。

There is also a book to recommendCoding an Architecture Style.


Today, I’d like to come here first. I hope it can be a reference for cloud native, technology leadership, enterprise management, system architecture design and evaluation, team management, project management, product management and team building
How to lead a good team
Build a small shock team for start-up companies
System architecture evolution in the international environment
Microservice architecture design
System architecture evolution of live video platform
Introduction to microservice and docker
Docker and CI continuous integration / CD
Case study on the evolution of Internet e-commerce shopping cart architecture
Message queue architecture in Internet business scenario
One of the evolution of Internet efficient R & D team management
Evolution of message system architecture design
One of the evolution of Internet e-commerce search architecture
The myth of enterprise informatization and software engineering
Introduction of enterprise project management
Elements of software project success
Introduction to interpersonal communication style
Lean it organization and shared leadership
Learning organization and enterprise
Enterprise innovation culture and hierarchy concept
Organizational goals and personal goals
Talent recruitment and management of start-ups
Talent company environment and corporate culture
Enterprise culture, team culture and knowledge sharing
Efficient team building
Project management communication plan
Build efficient R & D and automatic operation and maintenance
Practice of a large e-commerce cloud platform
Internet database architecture design ideas
It infrastructure planning scheme 1 (network system planning)
Customer analysis process of catering industry solutions
Purchasing strategy formulation and implementation process of catering industry solutions
Business design process of catering industry solutions
Supply chain demand survey checklist
Evolution of real time performance measurement system for enterprise applications
The difference between openshift and kubernetes

If you want to know more about software design and architecture, system it, enterprise informatization, team management information, please pay attention to my wechat subscription number:

MegadotnetMicroMsg_thumb1_thumb1_thu[2]

Author:Petter Liu
source:http://www.cnblogs.com/wintersun/
The copyright of this article belongs to the author and the blog Garden. You are welcome to reprint it. However, without the consent of the author, you must keep this statement and give the original link in the obvious position on the page of the article. Otherwise, you reserve the right to investigate the legal responsibility.