Cohesion
Cohesion is the degree to which the elements or responsibilities within a software unit are related and contribute to a coherent purpose.
Functional Design and Architecture: Examples in Haskell
Cohesion is the degree to which the responsibilities and internals of a software component belong together.
- How it is used
- Uses cohesion with coupling to keep complexity manageable during object-oriented and functional design.
- How deep it goes
- Defines blurred responsibility, diagnoses a coupled implementation, and refactors it through interfaces without detailing cohesion metrics.
- Examples
- Uses a thermometer-to-server Observer, ISensor and IConnection interfaces, and an analogous Haskell temperature workflow.
- What you can do after
- Evaluate and refactor components by isolating responsibilities behind interfaces and checking cohesion across object-oriented and functional code.
Read how Functional Design and Architecture: Examples in Haskell explains cohesion →
Architecture Modernization: Socio-technical alignment of software, strategy, and structure
The degree to which the concepts, events, rules, and activities within a subdomain are mutually related and form a coherent whole.
- How it is used
- Uses related concepts and coordinated change to shape subdomain boundaries, team ownership, and sustainable evolution.
- How deep it goes
- Analyzes purpose, event consistency, relatedness, team ownership, and coordinated change, stopping short of implementation detail.
- Examples
- Uses loyalty levels, Pickup and Dropoff events, and iterative accounting boundary designs as concrete examples.
- What you can do after
- Apply it via subdomain descriptions, sense-check questions, concrete scenarios, and a subdomain overview canvas to refine boundaries.
The Art of Code
High cohesion is a software-design condition in which a component's parts are closely related and focused on one responsibility.
- How it is used
- Guides separation of concerns by keeping responsibility-specific logic together within modules, layers, or classes.
- How deep it goes
- Explains cohesion through a class-level before-and-after example and connects it to coupling, without descending into implementation internals.
- Examples
- Uses OrderTools, PricingService, NotificationService, and architecture-review signals such as large classes and misplaced responsibilities.
- What you can do after
- Evaluate components for unrelated responsibilities and reorganize them into focused units with clearer boundaries.
Shipping Go: Develop, deliver, discuss, design, and go again
Cohesion is the degree to which the responsibilities of a software module or component belong together.
- How it is used
- Guides grouping service responsibilities into focused interfaces and components early in development.
- How deep it goes
- Defines high and low cohesion and illustrates each with class examples, without offering a measurement method.
- Examples
- Contrasts Validation with UserRegistrationValidation and broad responsibilities with clearly defined structures.
- What you can do after
- Evaluate whether a component groups one well-defined task or combines broad responsibilities.
Read how Shipping Go: Develop, deliver, discuss, design, and go again explains cohesion →
Related concepts
- microservice architectureused by · Microservice architecture is a software architectural style that organizes an application as independently deployable services with focused responsibilities that communicate through defined interfaces.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



