An Introduction to Domain-Driven Design at ConFoo

An Introduction to Domain-Driven Design at ConFoo

A five minute lightning talk delivered at ConFoo.

8896271ee9d6f46d4b1783c9566cb645?s=128

Bradley Holt

February 26, 2016
Tweet

Transcript

  1. ConFoo Bradley Holt, Developer Advocate Friday, February 26, 2016 An

    Introduction to Domain-Driven Design @BradleyHolt
  2. @BradleyHolt

  3. Domain-Driven Design A collaboration between domain experts and software practitioners

  4. Complexity is in the Domain Complexity is in the domain,

    not in the technology
  5. Models as Tools Models are tools used to solve problems

    within the domain
  6. The Map is not the Territory Don't confuse models with

    reality itself
  7. Building Blocks of DDD and the Life Cycle of a

    Domain Object
  8. Entities Entities are defined by their identity

  9. Value Objects Value objects encode attributes that describe things

  10. Aggregates Aggregates group related entities to minimize complexity

  11. Repositories A repository provides the illusion of an in-memory data

    store
  12. Domain Layer Order Aggregate @BradleyHolt Order - id : int

    - customer : Customer - date : Date - lineItems : LineItem[1..*] + total() : Money «interface» OrderRepository + insertOrder(order:Order) + updateOrder(order:Order) + findOrderById(id:int) : Order + recentOrders([limit:int]) : Order[0..*] Customer LineItem … Infrastructure Layer … InMemoryOrderRepository + insertOrder(order:Order) + updateOrder(order:Order) + findOrderById(id:int) : Order + recentOrders(limit:int) : Order[0..*] RelationalMapperOrderRepository + insertOrder(order:Order) + updateOrder(order:Order) + findOrderById(id:int) : Order + recentOrders(limit:int) : Order[0..*]
  13. Image Credits §  IMG_2619 by Jason Pelletier, on Flickr <https://flic.kr/p/k7Mp2C>

    §  Sounds_of_Complexity11.jpg by Enzo Varriale, on Flickr <https://flic.kr/p/4pC77a> §  model by MaZzuk, on Flickr <https://flic.kr/p/3fUREM> §  taking the subway to find the rents by Eli Duke, on Flickr <https://flic.kr/p/2z4udd> §  DSC_3407 by Mad House Photography, on Flickr <https://flic.kr/p/7EUfbx> §  red numbers by DaveBleasdale, on Flickr <https://flic.kr/p/6hkJWo> §  Social graph by Dmitry Grigoriev, on Flickr <https://flic.kr/p/fnzLPk> §  Catalog. by Adam Mayer, on Flickr <https://flic.kr/p/282Bh> @BradleyHolt
  14. Thank You @BradleyHolt