A presentation about Data-Contect-Interaction(DCI) for the Belgium DDD community, Antwerp April 30 2015 http://www.meetup.com/dddbelgium/events/219787290/ . Slides 2-13 is a short introduction in DCI, slides 14-18 are some ideas I have about it in combination with DDD and ES.
7. This picture and on coming pages example from Victor Savkin:
http://www.sitepoint.com/dci-the-evolution-of-the-object-oriented-paradigm/
8.
9.
10.
11.
12. what the system is
< >
what the system does
• anemic model, “data”
• adding behaviour in a “context”
• behaviour grouped in roles
• context = use case, scenarios
• model matches mental model
• readability of object oriented code
• object oriented < > class oriented
14. • separating behaviour from data
Behaviour is composable
• like in Functional Programming
At the moment we can see a tendency to decouple behaviour from objects!
15. Example: evolution of “services”
Eric Evans (2004):
• an operation offered as an interface
• without encapsulating state
• should be use judiciously
• not to strip entities and value objects of
all their behaviour
Debasish Ghosh (2015):
• more macro level abstraction than entity
or value object
• involves multiple entities and value objects
• usually models a use case of the business
16. “Data” don’t exist
• in Functional Programming
• and Event Sourcing
Data, state is
• a left fold
• a snapshot
• a result of a stream of events
17. • then what about
DATA? - Context - Interaction
• if we implement that with Event Sourcing
• we have events as a result of interacting roles
• a “context” instead of an “aggregate”
• roles played by a reconstituted stream of events
18. • can we learn from DCI for better
Domain Driven Design?
• behaviour related to use case / scenarios
• adding behaviour at runtime (roles)
• better names (context, role)
• algorithm more a whole, readability
• a model is not a tree...