← Graph

Application Layer vs Domain Layer

concept 1 connections

Architectural split promoted in the talk: the application layer lives inside the Rails app and contains controllers, service objects, form objects, read models and things like admin panels, mobile APIs, GraphQL endpoints and Shopify web-hook integrations. The domain layer lives OUTSIDE the Rails directory (e.g. in an `ecommerce/` folder), has no dependency on Rails or Active Support, and contains only commands, events, aggregates and the pure business logic of each typical or core domain. Domains don't know about each other; read models sit in the application layer because they can subscribe to events from multiple domains. Krzywda argues most Rails modularisation attempts fail because they assume a single layer of modularity.

category
architecture
about
Application Layer vs Domain Layer concept
Introduces the two-layer architectural split as the fix for single-level modularisation.

Provenance

Read by
4 extractions