BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Eric Evans: Practicing Domain-Driven Design

Eric Evans: Practicing Domain-Driven Design

This item in japanese

Bookmarks

For Eric Evans, it is important to explore and practice building software. Although he enjoys working with strategic patterns in Domain-Driven Design (DDD), what he finds really interesting is taking a difficult domain and reasoning about it differently -- breaking out of the mental box trying to find new concepts -- he admitted in his keynote at the recent DDD Europe 2018 conference in Amsterdam, where he also gave some practical examples from the domain of "time".

Evans, author of the original DDD book, has experienced many projects where teams have discovered new concepts in a domain and been able to build great software around it. Unfortunately, there are many he can’t discuss publicly; they may be business-related having non-disclosure agreements (NDA) associated with them, or they are arcane domains that needs a lot of time just to be described.

Generic subdomains are domains that appear in many systems and Evans has found that they make good practice ground, especially domains that have been neglected for a long time because we have become so used to how they work. He encourages developers to take the time to discover and explore new ideas on such domains, and to find new possibilities and new ways of modelling them. He notes that this is practicing at a tactical level; we are designing very specific things and should be coding to try the ideas out. He also notes that it’s important with lots of true variations. Minor enhancements are important when improving a model, but when we want to break out of the box we have to think about real alternatives.

To exemplify Evans uses Joda-Time, a library for the time domain that since a long time has been the standard tool for Java programmers, and which has been adopted into Java 8 after some refinements. One reason it hasn’t changed significantly for 10 years is that it has been good enough for most purposes. We have therefore stopped searching for alternatives, and that make us so used to it that we forget there could be alternatives, and we may even become unable to think of another way to do things. At that state we have reached what Evans calls "legacy blindness". In his experience, in nearly every project one of the obstacles to thinking differently is the familiarity with the current domain model, especially when there is a good legacy model. One way of breaking out of this blindness is to come up with concrete scenarios showing something awkward about the legacy model and use that as a starting point.

Evans shows several examples from Joda-time where he has tried to find new perspectives and concepts working with time. One example is adding months to an instance in time, which, depending on the starting date, may look a bit awkward:

  • Adding one month to January 31, 2018 will return February 28, 2018.
  • Adding two months to January 31, 2018 will return March 31, 2018.
  • Adding one month to January 31, 2018 and then one month again to the result will return March 28, 2018.

Another specific example is trying new ways of calculation to find the date for the American Thanksgiving holiday, which is the fourth Thursday in November. He emphasizes that the goal of his practising is not to replace the whole library, it’s to break away from the legacy blindness trying to find new concepts or ideas of how to solve things in a better way.

The planning for DDD Europe 2019 has started but the exact date has not yet been set.

Rate this Article

Adoption
Style

BT