liveBook · Manning

Vertical slice

As explained in Microservices Patterns, Second Edition

A vertical slice is an architectural partition that cuts through multiple layers to contain the functionality for a specific business capability.

A vertical slice is an architectural partition organized around a business capability. In a modular monolith, a domain module corresponds to a subdomain and contains its business logic plus supporting web/API and infrastructure logic. A single team owns each module, aligning responsibility with organizational boundaries. section 6.2.3

A module can use hexagonal architecture: inbound adapters expose interfaces such as a REST API, domain logic holds business rules, and outbound adapters connect to infrastructure such as a database. For example, a Consumer module separates its REST API, domain, and infrastructure packages. section 6.2.3

Design a domain module by deciding how to:

  • Structure its internal domain architecture. section 6.2.3
  • Define the API it exposes to other domains. section 6.2.3
  • Organize its database schema and classes or packages into build projects. section 6.2.3
Figure 6.9 Domain module has a hexagonal architecture
hexagonal domain module

Diagram of a domain module organized as a hexagonal architecture. section 6.2.3

How Microservices Patterns, Second Edition covers it

How deep it goes
Defines the module and names its adapters and design decisions, while deferring build-project organization.
Examples
Uses a Consumer module with REST API, domain, and infrastructure packages.
What you can do after
Build it from scratch by grouping a subdomain’s business logic and supporting adapters in an owned module.
How it connects
Connects subdomains with modular monoliths, hexagonal architecture, REST APIs, and adapters.

Also explained in

Compare how 2 books explain vertical slice →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.