Domain-driven Design in Android — Part 2

In part 1 we learned the need for a model. But how do we arrive at a model?

Crunching Knowledge

To tackle the complexity at the heart of software, we can’t just sit in a room by ourselves and write code. “Crunching knowledge” means talking to stakeholders and domain experts to distill a model. Evans gives the following example of the following conversation in the context of printed circuit board (PCB) design:

Beyond just nouns

Make business rules explicit

Domain-Driven Design elaborates in some detail. Imagine an app for booking cargo onto a ship voyage. We could easily write a method like this:

Communication and the use of language

Domain experts live in a world rich in a meaning independent of implementation. Developers are often not interested in the outer meaning, instead focusing on pure implementation. If we are not careful, a wasteful chasm develops. As DDD explains:


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store