← Graph

Introduce bounded-context controller namespaces

takeaway 2 connections

Applying DDD bounded contexts to Rails controllers: a universal 'article' model with conditional validations for editing vs moderation is the wrong shape. Create Web::Moderation::ArticlesController alongside Web::ArticlesController, each with its own actions and its own ApplicationController parent inside the namespace for authorization. Removes per-action and per-controller conditionals, reflects the URL structure, and is fully supported by Rails if you learn scope and namespace from day one. Controller names grow longer but describe the business domain.

type
recommendation
takeaway Introduce bounded-context controller namespaces
about
Bounded Context concept
Applies DDD bounded contexts at the controller layer.
takeaway Introduce bounded-context controller namespaces
from_talk
Takeaway from the Moderation::Articles example.

Provenance

Read by
8 extractions