Jimmy Nilsson reiterates what many of us have been saying: that several currently trendy
topicsspecifically, DDD, Patterns of Enterprise Application Architecture (PoEAA), and Test-Driven
Development (TDD)are not alternatives to each other, but are mutually reinforcing elements of
successful development.
Furthermore, all three of these are harder than they look at first. They require extensive knowledge
over a wide range. This book does spend some time advocating these approaches, but mostly it
focuses on the details of how to make them work.
Effective design is not just a bunch of techniques to be learned by rote; it is a way of thinking. As
Jimmy dives into an example he gives us a little window into his mind. He not only shows his
solution and explains it, he lets us see how he got there.
When I am designing something, dozens of considerations flit through my mind. If they are factors
I've dealt with often, they pass so quickly I am barely conscious of them. If they are in areas where
I have less confidence, I dwell on them more. I presume this is typical of designers, but it is
difficult to communicate to another person. As Jimmy walks through his examples, it is as if he
were slowing this process down to an observable pace. At every little juncture, three or four
alternatives present themselves and get weighed and rejected in favor of the one he eventually
chooses.
For example, we want model objects that are implemented free of entanglement with the
persistence technology. So what are eight ways (eight!) that a persistence framework can force you
to contaminate the implementation of a domain object? What considerations would lead you to
compromise on some of these points? What do the currently popular frameworks, including the
.NET platform, impose?
Jimmy thinks pragmatically. He draws on his experience to make a design choice that will likely
take him toward the goal, adhering to the deeper design principle, rather than the choice that looks
the most like a textbook example. And all of his decisions are provisional.
The first design principle Jimmy holds in front of himself is the fundamental goal of DDD: a design
that reflects deep understanding of the business problem at hand in a form that allows adaptation
to new wrinkles. So why so much discussion of technical framework and architecture?
It is a common misperception, perhaps a natural one, that such a priority on the domain demands
less technical talent and skill. Would that this were true. It would not be quite so difficult to become
a competent domain designer. Ironically, to render clear and useful domain concepts in software,
to keep them from being suffocated under technical clutter, requires particularly deft use of
technology. My observation is that those with the greatest mastery of technology and architectural
principles often know how to keep technology in its place and are among the most effective domain
modelers.
I do not refer to the knowledge of every quirk of complex tools, but to the mastery of the sort of
knowledge laid out in Martin Fowler's PoEAA, because naïve application of technology paradoxically
makes that technology more intrusive into the application.
For many people this book will fill in gaps of how to implement expressive object models in
practice. I picked up a number of useful ways of thinking through the application of technical
frameworks, and I especially firmed up my understanding of some particulars of doing DDD in a
.NET setting.
In addition to technical architecture, Jimmy spends a great deal of time on how to write tests. TDD