2011-05-22 domain driven design

Post on 14-Jul-2015

255 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

   

Domain Driven Design

Ismael Santos

@ifsantosrs

   

What is

DDD?

   

What is DDD?

   

Domain X Software

● Do you know what the software is talking about?

   

Ubiquitous Language

   

Ubiquitous Language

● Is a programming language?● Is an human language?● WTF is it??

   

Ubiquitous Language

   

Model Driven Design

● Is important to divide the application domain● The application construction must explain

about the domain

   

Entities

● Everything that needs an identity● Needs to be uniquely referenced● Examples: Order, Product, Route, etc.

   

Value Objects

● Elements that dont need an identity● Fast life-cicle● Can be constant● Example: Delivery address, Credit card

number, Font type, etc.

   

Agregates

● Encapsulate Entities and Value Objects from a comnon subject, to give easy acess to useful data

Entity

EntityValue Object

Value Object

Agregate

   

Factories

● Used to construct some elements when it is complex.

● Used in Agregates and Vaue objects● Encapsulate the contruction process

   

Services

● Is an operation that is not part of any Entity or Value Object

● Stateless● Follow the Ubiquitous Language

   

Modules

● Are like chapters from a story● Are about model, not about code

   

Repositories

● Used to store/retieve Entities and Agregates● Is centralized

   

Global vision

Ubiquitous Language Model Driven Design

Services

EntitiesValue Objects

Modules

FactoryAgregate Repository

   

References

● http://domaindrivendesign.org/resources/what_is_ddd

● http://en.wikipedia.org/wiki/Domain-driven_design

● http://www.infoq.com/minibooks/domain-driven-design-quickly

● http://vimeo.com/3545313

● Java Magazine, ed. 87

   

Feel free to DDD!

Thank you!

top related