Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Modular Monoliths

GOTO Conferences via YouTube

Overview

Explore the concept of modular monoliths in this 47-minute conference talk from GOTO Berlin 2018. Dive into the principles of well-structured codebases, examining how to organize code based on technical and functional perspectives. Learn about package-by-layer and package-by-feature approaches, and understand the importance of aligning code structure with architectural intent. Discover how to apply component-based and service-oriented design thinking to monolithic codebases, emphasizing modularity, encapsulation, and boundary enforcement. Gain insights on using tools and techniques to maintain code quality, including static analysis and architecture violation checking. Understand the relationship between good architecture and agility, and learn to avoid common pitfalls such as the model-code gap. Whether you're working with monoliths or microservices, this talk provides valuable lessons on creating maintainable and scalable software architectures.

Syllabus

Introduction
A well structured codebase is easy to visualise
the component exists conceptually
Abstractions should reflect the code
Our architecture diagrams don't match the code.
The code structure should reflect the architectural intent
Organise code based upon what the code does from a technical perspective
Package by layer is a "horizontal" slicing
Relaxed vs strict layering
Changes to a layered architecture usually result in changes across all layers
Organise code based upon what the code does from a functional perspective
Package by feature is a "vertical" slicing
Cited benefits include higher cohesion, lower coupling, and related code is easier to find
The "inside" is technology agnostic, and is often described in terms of a ubiquitous language
Architectural principles introduce consistency via constraints and guidelines
web controllers should never access repositories directly
Tooling? Static analysis tools, architecture violation checking, etc
types in package **/web should not access types in **/data
Using tools to assert good code structure seems like a hack
But Java's access modifiers are flawed...
Component? a grouping of related functionality behind a nice clean interface, which resides inside an execution environment like an application
Package by component is about applying component-based or service-oriented design thinking to a monolithic codebase
Modularity as a principle
Separating interface from implementation
Impermeable boundaries
The devil is in the implementation details
Organisation vs encapsulation
Use encapsulation to minimise the number of potential dependencies
If you're building a monolithic application with a single codebase, try to use the compiler to enforce boundaries
Or other decoupling modes such as a module framework that differentiates public from published types
Agility is a quality attribute
A good architecture enables agility
Whatever architectural approach you choose, don't forget about the implementation details
Beware of the model-code gap

Taught by

GOTO Conferences

Reviews

Start your review of Modular Monoliths

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.