Why Modular Monoliths Are More Than Just Hype

TLDRIn this talk, Simon Brown discusses the benefits and misconceptions of modular monoliths. He explains how a good code structure can enhance visualization and shares his C4 diagramming technique. Brown also explores the model-code gap and different ways to structure code, such as packaged by layer and packaged by feature. He concludes by emphasizing the importance of architectural coding styles and the need to reflect architectural intent in the code structure.

Key insights

🔍A good code structure should reflect architectural intent and enhance visualization.

🗺️The C4 model is a hierarchical set of architecture diagrams that describe software architecture systems.

🎛️The model-code gap refers to the mismatch between how we think about our system and how the code is structured.

📦Packaged by layer is a common but debated way to structure code based on technical components.

🎁Packaged by feature groups code by functional features or modules, but may pose challenges for code linking.

Q&A

What is the C4 model?

The C4 model is a hierarchical set of architecture diagrams that describe software architecture systems. It consists of context, container, component, and code diagrams.

What is the model-code gap?

The model-code gap refers to the mismatch between how we think about our system from a top-down perspective and how the code is structured at a low-level. It can lead to inconsistencies between architectural diagrams and the actual code.

What is packaged by layer?

Packaged by layer is a way to structure code based on technical components. It organizes code into layers such as web, business, and data, based on their functional responsibilities.

What is packaged by feature?

Packaged by feature groups code by functional features or modules. All code related to a specific feature is grouped together, promoting higher cohesion and making it easier to find relevant code.

What are the challenges of packaged by feature?

One challenge of packaged by feature is linking code between different features. If two features need to interact, determining the appropriate place to establish the link can be challenging.

Timestamped Summary

00:03Simon Brown discusses the benefits and misconceptions of modular monoliths.

01:14He introduces the C4 model, a hierarchical set of architecture diagrams.

05:06The model-code gap refers to the mismatch between architectural thinking and code structure.

08:29Packaged by layer organizes code based on technical components.

12:32Packaged by feature groups code by functional features or modules.