CRUD Systems And DDD Systems

Code Genie can design simple CRUD systems, but the real power of DDD appears when you model business behaviour instead of only data maintenance.

CRUD Style

CRUD means create, read, update, and delete. It works well when the main goal is to manage records and the business rules are minimal.

Example: Supplier Directory

  • Records: Supplier, Contact, Address, Certification.
  • Commands: Create Supplier, Update Supplier, Delete Supplier.
  • Queries: Search Suppliers, View Supplier Details.
  • Events: Supplier Created, Supplier Updated, Supplier Deleted.

Example: Product Reference Catalogue

  • Records: Product, Category, Attribute, Price List.
  • Commands: Add Product, Update Product, Archive Product.
  • Queries: Browse Products, Export Product List.
  • Events: Product Added, Product Updated, Product Archived.

DDD Style

DDD style focuses on decisions, workflows, invariants, and business language. The model explains why the system changes, not only that a row changed.

Example: Order Fulfilment

  • Commands: Place Order, Authorize Payment, Reserve Inventory, Release Shipment.
  • Events: Order Placed, Payment Authorized, Inventory Reserved, Shipment Released.
  • Aggregates: Order, Payment Authorization, Inventory Reservation, Shipment.
  • Policies: Reserve inventory when payment is authorized; release shipment when all items are available.

Example: Insurance Claims

  • Commands: Open Claim, Request Evidence, Approve Claim, Issue Payment.
  • Events: Claim Opened, Evidence Requested, Claim Approved, Payment Issued.
  • Aggregates: Claim, Policy, Assessment, Claim Payment.
  • Policies: Request assessor review when claimed amount exceeds threshold; notify repair partner when claim is approved.

How To Choose

  • Choose CRUD when users mostly maintain reference records.
  • Choose DDD when users perform business tasks with rules and consequences.
  • Choose DDD when one action can trigger several events, policies, integrations, or follow-up tasks.
  • Choose DDD when the business cares about the story of what happened.

A Useful Compromise

Many real systems contain both. For example, a logistics product may have CRUD-style vehicle maintenance screens and DDD-style dispatch, routing, exception handling, and proof-of-delivery flows. Model the simple parts simply and spend design energy where business behaviour matters.