I started my career at a Java shop. There was a lot of buzz there about enterprise applications. You would use Java Enterprise Edition to apply Patterns of Enterprise Architecture, implemented through Enterprise Java Beans. It wasn’t clear to me what made some applications more enterprise than others, or why following a specific set of ceremonies was supposed to yield more adequate solutions to their problems.
I found it suspicious that these programming concepts seemed to exist exclusively inside the Java echo chamber ecosystem.
I soon moved away from that Java shop and from Java programming in general, and enterprise recovered its place as an unremarkable English noun with mild trekkie undertones. I worked subsequently on consumer web apps, a media outlet, an MTG online community, a SaaS provider, an ad tech company, a crypto startup, then an AI one. (Which, read like that, kind of explains why I ended up needing a career break).
Last year I took what I would call a less pretentious, more technologically boring job in the healthcare sector. The challenge in this new company comes not from scale or growth or sophisticated tools but from the complexity of the domain—from the need to design an organization, and consequently, a software architecture, that automates and eventually simplifies its business processes. This shift in focus made me want to go back to the basics, and so I have been reading and writing about knowledge building and testing-as-design. It was through the Unit Testing book from that last post that I finally came to terms with the enterprise application concept:
An enterprise application is an application that aims at automating or assisting an organization’s inner processes. It can take many forms, but usually the characteristics of an enterprise software are
- High business logic complexity
- Long project lifespan
- Moderate amounts of data
- Low or moderate performance requirements
This is a pretty accurate description of what I work on now, and how it differs from what I worked on before. Given the kind of challenges I currently face—fleshing out business processes, reconciling terminology, modernizing the legacy monolith, figuring out what the domain entities are and who should own them—a natural next step was to take a fresh look at Domain-Driven Design.
I picked up Vlad Khononov’s Learning Domain-Driven Design as a modern alternative to the classic Eric Evans’ blue book. It summarizes and updates the same ideas, and finally relates them to newer techniques like Microservices, Event-Driven Architecture, and Data Mesh.
The first part, Strategic Design, covering the core DDD concepts, was the most useful for my purposes. The rest of this section is a summary of its contents.
There are three types of subdomains:
| Subdomain Type | Competitive advantage | Complexity | Volatility | Implementation | Problem |
|---|---|---|---|---|---|
| Core | Yes | High | High | In-house | Interesting |
| Generic | No | High | Low | Buy/adopt | Solved |
| Supporting | No | Low | Low | In-house/outsource | Obvious |
Domain experts are knowledge authorities in the software’s business domain. They are either the people coming up with requirements or the software’s end users. The software is supposed to solve their problems.
A ubiquitous language is the terminology that describes the business domain, shared between all project-related stakeholders. It allows domain experts and team members to communicate without the need for translators or intermediaries.
Since different domain experts can hold conflicting views of the business, the ubiquitous language is divided into smaller, internally consistent languages with specific areas of application called bounded contexts.
While they are both means to decompose the business domain, a bounded context is different from a subdomain:
Bounded contexts express different, possibly conflicting views of the domain, but they still need to interact with each other to build useful systems. There are a few approaches to integrating them:
Much like the early Agile methodologies, Domain-Driven Design relies on a tight collaboration between software designers and users—in this case, the domain experts. This can be challenging because most organizations aren’t set up for such collaboration:
The book acknowledges some of the challenges but doesn’t offer satisfying solutions, perhaps because they fall into organizational design and politics rather than software. There are two ways I can imagine Domain-Driven Design working in the real-world organizations I’ve known:
I was less interested in the middle section of the book, dedicated to Tactical Design. I found it too prescriptive, too pattern-y, perhaps out of a debt to the original formulation of DDD, that came associated with specific programming techniques and enterprise architectural patterns. These few chapters build up a heuristics decision tree, where the subdomain type and a few other attributes cascade into each design decision of the development process (data modeling, application architecture, testing strategy):
I unexpectedly found a lot of value in the last few chapters, where the DDD approach is integrated with other methodologies. The chapter on microservices, in particular, is one of the best treatments I’ve seen of the subject5, placing it not only in the context of DDD but also of modular design, as explained by John Ousterhout, and of the work by a Glenford J. Myers, to whom we owe this gem:
There is much more to the subject of complexity than simply attempting to minimize the local complexity of each part of a program. A much more important type of complexity is global complexity: the complexity of the overall structure of a program or system (i.e., the degree of association or interdependence among the major pieces of a program).
This is similar to the innovation tokens concept.
Understandably: more often than not, engineers are unwilling or unprepared to talk in non technical terms; more often than not, business people lack the patience and the time to deal with engineers.
This, of course, runs the risk of designers getting the terminology wrong by their lack of business knowledge.
With the caveat that this book looks much more organizational designer than individual contributor-oriented.
An earlier version of this discussion can be found in this blog post, although I preferred the book chapter.