2011-05-22 domain driven design

18
 Domain Driven Design Ismael Santos @ifsantosrs

Upload: ismael-santos

Post on 14-Jul-2015

255 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: 2011-05-22 Domain Driven Design

   

Domain Driven Design

Ismael Santos

@ifsantosrs

Page 2: 2011-05-22 Domain Driven Design

   

What is

DDD?

Page 3: 2011-05-22 Domain Driven Design

   

What is DDD?

Page 4: 2011-05-22 Domain Driven Design

   

Domain X Software

● Do you know what the software is talking about?

Page 5: 2011-05-22 Domain Driven Design

   

Ubiquitous Language

Page 6: 2011-05-22 Domain Driven Design

   

Ubiquitous Language

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

Page 7: 2011-05-22 Domain Driven Design

   

Ubiquitous Language

Page 8: 2011-05-22 Domain Driven Design

   

Model Driven Design

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

about the domain

Page 9: 2011-05-22 Domain Driven Design

   

Entities

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

Page 10: 2011-05-22 Domain Driven Design

   

Value Objects

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

number, Font type, etc.

Page 11: 2011-05-22 Domain Driven Design

   

Agregates

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

Entity

EntityValue Object

Value Object

Agregate

Page 12: 2011-05-22 Domain Driven Design

   

Factories

● Used to construct some elements when it is complex.

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

Page 13: 2011-05-22 Domain Driven Design

   

Services

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

● Stateless● Follow the Ubiquitous Language

Page 14: 2011-05-22 Domain Driven Design

   

Modules

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

Page 15: 2011-05-22 Domain Driven Design

   

Repositories

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

Page 16: 2011-05-22 Domain Driven Design

   

Global vision

Ubiquitous Language Model Driven Design

Services

EntitiesValue Objects

Modules

FactoryAgregate Repository

Page 17: 2011-05-22 Domain Driven Design

   

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

Page 18: 2011-05-22 Domain Driven Design

   

Feel free to DDD!

Thank you!