Notes by Stephen R. Palmer
| Title: | Domain Driven Design |
| Author: | Eric Evans |
| Publisher: | Prentice Hall PTR |
| ISBN: | 0321125215 |
| Published: | 2004 |
| Amazon links: | amazon.com
|
| Author web sites: | www.DomainDrivenDesign.org |
Domain-Driven Design claims the key to success is to 'bind
the model
and the implementation'. In other words, the model as shown in diagrams
prominently pinned to development team meeting-room walls shows a model
that is intimately linked to the model of classes,
references and collaborations in the source code.
One obvious way to do this, is to involve developers in the process
of building the model. In chapter 1 of the book, Eric describes an
initial brainstorming modeling session he had with a domain expert.
This
resulted in a useful model but far more valuable, Eric as the developer
gained knowledge and insight into the
domain during the process of building
the model. Eric calls this collaborative brainstorming model-building
activity, knowledge crunching.
Incidentally, in many cases, the domain
experts participating in such sessions come to a deeper and better
organised appreciation
of the domain too.
This initial, collaborative, brainstorming, model-building activity
reminds me very strongly of process one defined in Feature-Driven
Development (www.amazon.com,
www.amazon.co.uk),
Jeff De Luca's ,
highly-iterative, model-centric development process.
In addition to the knowledge gained during the modeling sessions, the terms used to name items in the model start to form an unambiguous vocabulary shared by both the domain experts and the developers involved. This shared vocabulary is soften so valuable that Domain-Driven Design gives it a name, calling it the ubiquitous language of the project. The idea that the terms in the model become a vocabulary shared between domain-experts and developers is not a new one but its importance tends to be underestimated. Whether you like the name or not, naming the shared vocabulary immediately raises its profile in a similar way that giving a name to a design pattern does. Most younger developers can converse in terms of strategy patterns, factory patterns, etc., from the names given to design patterns by the gang of four in the 1990's. Giving a name to this shared vocabulary does something similar for this important result of collaborative, brainstorming object modeling activities.
The first half of the Domain-Driven Design book continues in a
similar vein. It has
little that is actually new but does what all good books of this
type do, and that is clearly define and give a name to commonly
used patterns, useful strategies and proven best practices. There is
not much to complain about here and someone new to modeling will find
the descriptions of different kinds of building block class useful.
However, it certainly is not groundbreaking in the quite the same way
that Peter Coad's class
archetypes, or Nicola, Mayfield and Abney's 12 collaboration
patterns described in their book, Streamlined
Object Modeling are.
From chapter 10 onwards, things change. The book starts
to introduce much more
sophisticated ideas, patterns, and strategies. Here is more than
enough food for thought, even for the most experienced
object modeler or agile designer/developer.
Personally, I find the ideas in the book complement those in Java Modeling In
Color and they fit very well into my understanding of the use of
modeling within FDD
as described in A Practical Guide to Feature-Driven
Development. The book is also another reminder that agile
development is not an excuse to skimp on analysis or design and dive
into coding undocumented, unmaintainable software. It it actually the
complete opposite. True agile development requires more discipline and
professional maturity than older approaches because there is no
heavy-weight, high-ceremony process to hide behind.
Recommended reading!
One final note on the name: I believe all software development efforts must ultimately be requirement-driven. After all, it is the project's responsibility to deliver software that functions as the paying client requires. Therefore, I dislike terms such as model-driven development. The model does not drive development; the requirements, whether you call them features, backlog items, user stories, functional requirements or use cases, should drive development. Development should be centred around the model, not driven by it. Thankfully, this is domain driven design and not domain driven development. This makes a bit more sense in that the design of the functions needed to meet a requirement is driven by the domain while the overall development effort is driven by the requirements.