Sometimes you want to do Domain-Driven Design, but the bad guys are against you. Sometimes you need tobe the bad guy. This is Domain-Driven Design in a bloody brownfield scenario.
6. Anti-pattern
I want to do DDD
I don’t know DDD well...
...so I apply DDD to a
simple problem
I don’t see any advantage
...DDD is useless.
giovedì 23 maggio 13
25. avanscoperta
Checklist
Tools? --> Tool. (always the same)
Precision? --> “When you are in state 12,
the field MRKT_NFLD can be only B or
K”
Language? --> :-(
giovedì 23 maggio 13
38. avanscoperta
Data-‐based
integra5on
checklist
Can we tell...
Which application is responsible for the data
structure?
Which requirement influenced data definition?
Is it still valid?
It it valid in my context?
Which applications use that data?
Which consequences if we alter the structure?
giovedì 23 maggio 13
83. (almost) same data
Different Behaviour
submit
registerPayment
amount
customer
state
<<Entity>>
Fattura
edit
validate
amount
customer
<<Entity>>
InvoicePreview
giovedì 23 maggio 13
133. Accounting it right
Implementing amazing
functionalities € 10.000
Learning new techniques
and tools € 4.000
giovedì 23 maggio 13
134. Accounting it right
Implementing amazing
functionalities € 10.000
Learning new techniques
and tools € 4.000
Establish Safety Conditions € 12.000
giovedì 23 maggio 13
135. Accounting it right
Implementing amazing
functionalities € 10.000
Learning new techniques
and tools € 4.000
Establish Safety Conditions € 12.000
Cleaning up somebody else’s
mess € 8.000
giovedì 23 maggio 13
149. Product
Owner
Team
A
simple
requirement A
simple
requirement
Done
as
DDD
prescribes
In
a
clean
and
elegant
fashion
giovedì 23 maggio 13
150. Product
Owner
Team
A
simple
requirement A
simple
requirement
Done
as
DDD
prescribes
In
a
clean
and
elegant
fashion
Soon
giovedì 23 maggio 13
151. Product
Owner
Team
A
simple
requirement A
simple
requirement
Done
as
DDD
prescribes
In
a
clean
and
elegant
fashion
Soon ....ooops
giovedì 23 maggio 13
152. Yes, but how can I
understand if I am
doing DDD?
giovedì 23 maggio 13
153. avanscoperta
Are
we
really
doing
DDD?
Result is better than expectations
No fear in rewriting pieces
We’re having fun
giovedì 23 maggio 13