Leveraging more then DDD Lite in the startup project

26

description

Short presentation about how Domain Driven Design help me with my startup project. A lightweight CQRS approach was used (commands separated from queries without other ceremony).

Transcript of Leveraging more then DDD Lite in the startup project

Page 1: Leveraging more then DDD Lite in the startup project
Page 2: Leveraging more then DDD Lite in the startup project

Points to consider

• First rapide release• Should it be dirty but fast ?• Fear of overengeeniring / overdesign• Lack of explicit domain• Lack of domain expert

Page 3: Leveraging more then DDD Lite in the startup project

What we’re exactly doing ?

Phase 1• Gather user profiles• Offer configurable visual templates• Share on social networksPhase 2• Web intelligence matching algo• Feedback collecting• Job offer recommendations

Page 4: Leveraging more then DDD Lite in the startup project

Going down the DDD path…

• We want to avoid architecture 2011 effect

Page 5: Leveraging more then DDD Lite in the startup project

What DDD could bring us ?

• Staying on the right track

Page 6: Leveraging more then DDD Lite in the startup project
Page 7: Leveraging more then DDD Lite in the startup project

What benefit DDD could bring us ?

• Staying on the right track• Explicit behavior• Discovering concepts by challenging

constantly what we know about the model• Application features are going to change often

over the years (Vaughn Vernon IDDD book)• You don’t understand the domain because it’s

new (Vaughn Vernon IDDD book)

Page 8: Leveraging more then DDD Lite in the startup project

Strategic design

• Working on the use cases from screens• Making a model• Challenging your assumptions• Starting to define UL• Code / Refactor• Iterate over the points above

Page 9: Leveraging more then DDD Lite in the startup project
Page 10: Leveraging more then DDD Lite in the startup project

CQRS… what ?

Idea behind• Separate write from readsPoints to consider• Do I need a separate data store for r/w ?• Do I need ES ?• Do I need Event Store ?• Do I need Domain Events ? (more DDD part)

Page 11: Leveraging more then DDD Lite in the startup project
Page 12: Leveraging more then DDD Lite in the startup project
Page 13: Leveraging more then DDD Lite in the startup project

UI

Page 14: Leveraging more then DDD Lite in the startup project

UI

Page 15: Leveraging more then DDD Lite in the startup project

Domain

Page 16: Leveraging more then DDD Lite in the startup project

Infrastructure CommandProc

Page 17: Leveraging more then DDD Lite in the startup project

Validation

Page 18: Leveraging more then DDD Lite in the startup project

Validation Ex: 2

Page 19: Leveraging more then DDD Lite in the startup project

Validation Ex: 3

Page 20: Leveraging more then DDD Lite in the startup project

Domain

Page 21: Leveraging more then DDD Lite in the startup project

Breaking the rule

• Rule of thumb : One aggregate state modification per transaction

Page 22: Leveraging more then DDD Lite in the startup project
Page 23: Leveraging more then DDD Lite in the startup project

UI

Page 24: Leveraging more then DDD Lite in the startup project

Infrastructure

Page 25: Leveraging more then DDD Lite in the startup project

Wrap up

What I’ve achieved• Decoupling• Maintanibility• ExtensibilityWhat bothers me• Mapping (« at boundaries, application are not

object oriented » Mark Seemann)

Page 26: Leveraging more then DDD Lite in the startup project

Proof