Domain-Driven Design our way
Domain-Driven Design (DDD) is a shared umbrella for many well-known patterns and tools. This article opens the "Domain-Driven Design: our way" series and briefly outlines what the project is about.
Building software today requires not just a firm grasp of technology, but also a thorough understanding of the business behind that software – including knowledge of the operational domain and of how the organization is structured. Luckily, the software industry has come up with a number of techniques that support this.
Domain-Driven Design (DDD) is a shared umbrella for many well-known patterns and tools. This article, which opens the series “Domain-Driven Design: our way”, gives a short outline of what the project will cover. So it is neither a complete description of the project nor of DDD as a whole, but rather a preview of what will soon appear on our tech blog.
The Why
Our company specializes in helping companies of all sizes on their path to digital transformation. Our portfolio spans a broad range of projects, each dealing with complex business domains in many different industries. Our expertise covers end-to-end projects: analysing and collecting requirements, designing and building solutions, and then maintaining and supporting them over time.
Most of those projects, however, are covered by non-disclosure agreements (NDAs), which restricts how much detail we can make public. Still, since we are committed to sharing knowledge and experience, we kept looking for ways to show how we work with clients throughout software development. That is how the idea for this project came about.
What we want is to share our knowledge of and experience with Domain-Driven Design, along with the many complementary tools and techniques we routinely apply in client projects. By presenting it, we hope to pass our experience and know-how on to the community and also to show our own take on certain aspects of Domain-Driven Design, shaped by our company’s background in remote work.
The What
Since this is a fairly large undertaking, we chose to split the project into a number of parts. At this stage, we want to pick an example from a real-world domain and decompose it into its basic building blocks to understand how that particular part of the business works.
How are we going to do that? With exactly the same methods we apply with our real clients.
When clients come to us, we at first need help to fully understand their needs. We may also lack a clear picture of how their business runs, how it makes money and what other key factors make it successful. A deep, thorough understanding of all this is vital for building dependable, well-designed solutions.
That’s why we usually begin with a set of workshops intended to understand the client’s business, needs and requirements. Interestingly, such sessions occasionally help the client understand their own business better too, or reveal possible improvements in the process being discussed.
We use a number of techniques at this stage, but among the most effective is the (Big Picture) Event Storming workshop. It works especially well for exploring business domains, processes and the actors that take part in them.
The Event Storming workshop is the technique we’d like to show you in the project’s first phase, which has two aims. The first aim is to set criteria and choose the domain we’ll work on for the rest of the project. The second is to plan and run a Big Picture Event Storming session that will help us understand the selected domain more deeply.
What is Domain-Driven Design?
Although explaining DDD in depth isn’t the main purpose of this article, a basic idea of what the term means is essential for understanding the project. So let me briefly describe this methodology.
In DDD, the code’s structure, logic and language reflect the business domain, usually captured in what is called the ubiquitous language, which makes the software more relevant, more intuitive and easier to adapt as the business changes. The methodology is especially useful for complex domains in which business concepts and rules are of central importance.
Domain-Driven Design puts great weight on building a domain model – a conceptual framework that reflects the subtleties, operations and rules of the business domain. Developers and domain experts keep refining this model together, so that it stays an accurate reflection of how complex the domain is.
The domain model forms the basis of the system: it drives how features are designed and implemented and makes sure the software can evolve as the business environment changes.
If you work in engineering and want to learn more about DDD principles, there are plenty of great books and articles available. For newcomers, I especially recommend “Learning Domain-Driven Design” by Vlad Khononov, which we discussed recently in the latest edition of our company reading club. If you’d like more, I also suggest “Domain-Driven Design” by Eric Evans, widely referred to as the “Blue Book”.
If, on the other hand, you don’t have a technical background but would like to know more about DDD, I recommend my recent article. It describes the central idea of DDD, how it benefits an organization and what business value it delivers, without going too far into complicated technical jargon.
Choosing a complex business domain
Finding the right domain took us a while. We didn’t want a problem that was too simple, since that would turn our work into nothing more than basic CRUD (Create, Read, Update, Delete) operations. At the same time, a domain that was too complicated could make it hard to present effectively, because explaining all its intricacies would take a lot of effort.
We also had to consider whether we had access to domain knowledge: we couldn’t choose a domain we knew nothing about, or one where we had no contacts with the relevant expertise, as carrying out such a project would be very hard, if not impossible. On top of that, we had to respect all the NDAs in force.
In the end, we settled on a process that is well established in our company and in which we have strong domain expertise: managing devices/equipment. This process kicks in every time one of our colleagues needs a new device – whether a newcomer needs a computer, or a device has been damaged or is simply not powerful enough for our everyday software development work.
Our administration team is central to running this process. They keep track of the inventory of available devices, spare and emergency ones included, and decide when new devices should be ordered or existing ones retired.
At first sight, this may not look particularly complex. However, we found a few subtleties in the process, which we intend to point out in this series of blog posts. We were happy with the choice, since the process is simple enough to present but goes further than basic CRUD operations. Besides, almost everyone roughly knows how it works, at least at a high level, so the ubiquitous language we came up with is fairly easy to follow.
The Team
Once we had chosen the business process to work on, it was time to dive into the domain. As developers, we knew the inventory process only from the user’s side (yes, we need computers and other devices), and that knowledge was rather shallow. We therefore needed experts to help us run Big Picture Event Storming sessions and gain a deeper understanding of the domain.
Picking the right participants for Event Storming is key to a successful workshop. Running it without the right experts may simply waste time. So who are these “right people”? Generally, they are the ones able to answer the questions asked by developers or modelers – people who take part in the process as executors, users, supervisors or designers.
It also helps to bring in people who see the explored domain from different angles. The more diversity, the better the results, although having too many participants can end in chaos.
For us, choosing the participants was fairly easy. We invited our dear colleagues from the administration department, who both use and design the device management processes at our company. Let us introduce our two domain experts:
That gave us the people who knew the answers. Next, we needed people able to ask the right questions. A colleague and I took on this role:
Each Event Storming session needs someone who makes sure its goals are met and who keeps the participants engaged and energized. Our sessions were skillfully facilitated by a colleague who was excellent at handling the chaos and guiding the group dynamics very effectively.
Event Storming workshop planning
Before starting the session, we did a few things to increase the odds of it going well. To begin with, we introduced our administration experts to how an Event Storming workshop works. We told them what to expect, how the session would run and how to get ready for it (creating a Miro account, making sure their headphones worked well, etc.). It wasn’t a full walkthrough of Event Storming, just a few key teasers – the facilitator normally explains the details during the workshop itself.
It’s worth noting that we ran the sessions online using Miro. Most Event Storming resources, including its creator Alberto Brandolini, recommend holding sessions in a room with physical sticky notes and a huge blank sheet of paper on the wall that gives unlimited modeling space (this approach changed during the pandemic). I agree that sharing a room and seeing one another’s emotions benefits such workshops, but at our company we have a lot of experience in remote work.
Since we have been a fully remote company from the very beginning, going online was the obvious choice for us. Our long experience with remote tools helps us a great deal in overcoming the difficulties of remote workshops. This is how we normally collaborate with our clients, and we wanted to show this side of our work.
Next, we booked the first session. We knew the meeting couldn’t be too long if everyone was to stay focused, so we reserved a 5-hour slot, planning to stop after a certain part of the workshop and pick up in another session. That’s one advantage of remote Event Storming: splitting the workshop into a few shorter meetings is much easier when nobody has to travel to a single location. It helps participants stay focused and in good spirits.
Lastly, the facilitator prepared the Miro board and invited everyone to a Google Meet call, and we were all looking forward to the first Event Storming session.
Outro
No doubt you’re just as curious about how the session went. Upcoming articles will cover it in detail: we’ll show how the session progressed, explain every phase of the workshop, point out the benefits and difficulties of remote sessions and describe how we dealt with them.
We are also planning to interview our domain experts about their impressions of the workshop. Stay tuned!