Introduction to DDD

26
Introduction to DDD ThinkApps Live August 14, 2015 Software House

Transcript of Introduction to DDD

Page 1: Introduction to DDD

Introduction to DDD

ThinkApps Live August 14, 2015

Software House

Page 3: Introduction to DDD

What is DDD?

Page 4: Introduction to DDD
Page 5: Introduction to DDD

Concepts of DDD

Page 6: Introduction to DDD

Ubiquitous Language(naming matters!)

Page 7: Introduction to DDD

Context(it matters!)

Page 8: Introduction to DDD

Domain(knowledge base)

Page 9: Introduction to DDD

Model(abstractions)

Page 10: Introduction to DDD

Building blocks

Page 11: Introduction to DDD

Entity(object with an identity)

Page 12: Introduction to DDD

Factory(creates things)

Page 13: Introduction to DDD

Value object(immutable representation of value)

Page 14: Introduction to DDD

Repository(talks with DB)

Page 15: Introduction to DDD

Service(a place where things happen)

Page 16: Introduction to DDD

Service example

Page 17: Introduction to DDD

Command

Page 18: Introduction to DDD

Handler

Page 19: Introduction to DDD

Controller

Page 20: Introduction to DDD

There’s more of it!

Page 21: Introduction to DDD

Pros

● separated layer for business rules● heavy use of OOP patterns● separation of concerns● readable code● codebase is “live documentation”● easy to maintain● clean code!

Page 22: Introduction to DDD
Page 23: Introduction to DDD

Cons

● code overhead● steep learning curve● heavy use of OOP patterns● requires to change habits● things need to be named :)

Page 24: Introduction to DDD

There are only two hard things in Computer

Science: cache invalidation and naming things.

-- Phil Karlton

Page 25: Introduction to DDD

How DeSmart started to use DDD?

Page 26: Introduction to DDD

Thank you!