collection Commons
Private · saved on this device

Domain Modeling and Business Logic

Express business concepts, rules, and valid changes through deliberate models and responsibilities.

These patterns examine how software represents business meaning and organizes the rules that govern valid changes.

Domain Model combines behavior with the state it governs, so callers request meaningful operations rather than editing records freely.

Entity preserves the identity of a continuing domain concept across changes to its attributes and representations.

Value Object represents a coherent domain value with attribute-based equality, validation, and immutable replacement.

Aggregate places a consistency boundary around a root and its owned state, so changes preserve the rules of the complete unit.

Domain Service names a focused business operation that has no natural entity or value-object owner, while keeping state and invariants with their owners.

Domain Event records a meaningful occurrence as a fact, separating the state owner from reactions and making commitment and delivery choices explicit.

Specification gives a matching criterion its own reusable object, so selection and validation can share the rule and combine it with other requirements.

Bounded Context defines where a coherent model and its language apply, while making translations and responsibilities between models explicit.

Service Layer defines shared application operations that coordinate domain behavior, persistence, and transaction outcomes across different callers.

Transaction Script organizes business rules around procedures that handle complete application requests, sharing helpers where useful.

Compare this organization of business logic with the wider structural choices in Application Architecture.

Curated selection

In this Collection

10 entries · Author-defined order
  1. Software Engineering

    pattern · commons

    Domain Model

    Organize business rules and state into collaborating domain objects whose operations preserve the model's invariants.

  2. Software Engineering

    pattern · commons

    Entity

    Track a domain object by a stable identity across changes and representations, rather than defining it by its current attributes.

  3. Software Engineering

    pattern · commons

    Value Object

    Represent a meaningful domain value as an immutable whole, with equality determined by its attributes and operations that return new values.

  4. Software Engineering

    pattern · commons

    Aggregate

    Group domain objects that must stay consistent behind one root, and make that boundary the unit of controlled change and atomic persistence.

  5. Software Engineering

    pattern · commons

    Domain Service

    Express a meaningful domain operation that has no natural entity or value-object owner as a focused, stateless service with a domain-language contract.

  6. Software Engineering

    pattern · commons

    Domain Event

    Represent a meaningful occurrence in the domain as an immutable fact, so its owner can record what happened without knowing every reaction.

  7. Software Engineering

    pattern · commons

    Specification

    Give a domain matching rule its own object, so callers can reuse and combine the criterion independently of candidates and selection code.

  8. Data EngineeringSoftware Engineering

    pattern · commons

    Bounded Context

    Give each business model an explicit boundary for its terms and rules, then connect models through deliberate mappings rather than assuming shared meanings.

  9. Software Engineering

    pattern · commons

    Service Layer

    Define application operations at a shared boundary that coordinates domain behavior, persistence, and transaction outcomes for different callers.

  10. Software Engineering

    pattern · commons

    Transaction Script

    Organize business logic around procedures that handle complete application requests, using direct data access or shared helpers as needed.