Back

Domain-Driven Design: Understanding Ubiquitous Language

August 1, 2024

Let’s continue learning about DDD. Today: ubiquitous language. 🎙️

As we already know, as software engineers, our job is to create software systems that solve business problems. In the latest post about Domain-Driven Design, we discussed how important it is to work closely with domain experts (business people) to gain a deeper understanding of the complexities of the business we are modeling and translating into code. These business problems are essentially challenges associated with streamlining workflows and processes, reducing manual effort, optimizing resource management, enhancing decision-making, handling data effectively, and more.

To design an effective software solution, one of the most important things is to discover the knowledge of the business domain. Talking with domain experts and people who know about the business. Therefore, communication is crucial. It’s essential to use the same business terminology to better align and understand. Effective communication is key to knowledge sharing and project success. 🗣

This is not always easy when there are different stakeholders involved: domain experts, engineers, UI/UX designers, project managers, testers, business analysts, etc. As in any collaborative effort, the outcome depends on how well all these parties work together. 🤼

I'm sure you've seen many times where the entity "user" is misunderstood. Is it referring to the visitor who just enters the system? Or does it also include the one who has an account? Or maybe even the admin? 🤔

Typically, business professionals and engineers don’t interact directly. Instead, domain knowledge is passed from domain experts to engineers through intermediaries, or "translators" who act as mediators.

Today, I would like to introduce you to the ubiquitous language. The idea is simple and straightforward: if parties need to communicate efficiently, instead of relying on translations, they must speak the same language. All stakeholders should use the ubiquitous language when describing the business domain. This is essentially the language of the business. As such, it should consist only of business domain-related terms, with no technical jargon (very important)!

The ubiquitous language must be precise and consistent.

  • Consistency: Each term should have one and only one meaning.
  • Ambiguity: Each term should have a single meaning.
  • Synonyms: Two terms cannot be used interchangeably.

This will allow us to better model the business domain, which we will explore further in the following posts!

Hope you liked this post, stay tuned for more concepts about Domain-Driven Design 💡

Enjoy your day, and happy coding! 🌅