Introduction to DDD

Post on 24-Jan-2017

209 views 0 download

Transcript of Introduction to DDD

Introduction to DDD

ThinkApps Live August 14, 2015

Software House

What is DDD?

Concepts of DDD

Ubiquitous Language(naming matters!)

Context(it matters!)

Domain(knowledge base)

Model(abstractions)

Building blocks

Entity(object with an identity)

Factory(creates things)

Value object(immutable representation of value)

Repository(talks with DB)

Service(a place where things happen)

Service example

Command

Handler

Controller

There’s more of it!

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!

Cons

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

There are only two hard things in Computer

Science: cache invalidation and naming things.

-- Phil Karlton

How DeSmart started to use DDD?

Thank you!