refactoring towards the ubiquitous language
DESCRIPTION
Slides from my Euricom Spain 2013 talk on the ubiquitous language, with an example of refactoring from an anemic model to a more rich domain model.TRANSCRIPT
Refactoring towards the ubiquitous language
@JefClaes – jefclaes.be
What language?
When a customer moves, we want to send him an email.
UPDATE tbl_customerSET street = … WHERE id = …
It’s us, not them
We have forgotten how to talk
• Database
• Framework
• ORM
• Tools
• Code generation
• UI technology
• ...
= =
The ubiquitous language
Better understanding
of ‘the business’
Faster and less error-prone communication
Less documentation!
Code can be understood
by everyone
Example
Our business has customers. A customer must have a customer number, an address and an
email address. A customer can move to a new address. When a customer moves, we want to
send them an email.
Can we tell this story in code?
Before
After
Before
Before
After
After
After
Work the language,
make the implicit explicit
Disclaimer
CRUD can be fine too.
Learn where the value is in your system.