July 6, 2022  David Vaz

Domain-Driven Design For Cohesive Digital Product Development 

Leverage software systems to organize complex domains and structure often-confusing business logic for optimal output. 

Today the industry has moved from product-driven to customer-centric solutions. From FMCG to hospitality and aviation, offering customer-centric and brand-defining solutions are crucial to delivering value for every industry. 

Enter Design Thinking! It is an ideology and a method concerned with providing solutions for customers’ complex enterprise problems in a highly user-centric manner at all the stages of development – from laying out the design basics through the testing stage. 

From a development perspective, Design Thinking stresses purpose over execution, leveraging the Stanford Design School model of ‘Empathize, Define, Ideate, Prototype, and Test’. Businesses seeking to appoint developers have recognized the value generated by this user-centric approach. 

Design Thinking in software development focuses on the purpose over the execution. Moving away from the one-size-fits-all process, every new development idea must cater to your customer’s unique workflows and methodologies. Design Thinking facilitates understanding your user’s needs, challenges norms, redefines problems, and solves them while speeding the overall development process. 

What is Domain-Driven Design? 

Domain-Driven Design is a term coined by technologist Eric Evans in his 2004 book “Domain-Driven Design: Tackling Complexity in the Heart of Software.” He shared his idea that all involved in designing a product need a common language and that language should also form an essential part of the product to be built. 

For instance, if a software processes flight booking, it might have classes like International Travel and Domestic Travel and methods such as Search Flight and Book Flight. In this context, Domain-Driven Design (DDD) as a software design approach will model the software to match a specific domain (aviation in the above example) based on inputs received from that domain’s experts. 

Object-oriented programming implies that the language and structure of your software code (class names, methods, and variables) must match that of the business domain. 

In other words, Domain-Driven Design is a system of collaboration that enables technical and non-technical contributors (e.g., subject matter experts) to communicate and understand each other to enhance the eventual value of the product being created. 

How does Domain-Driven Design Connect to Design Thinking?  

When developers have to build a high-grade product, they engage with UX developers, subject matter experts, and business analysts. They explore deep into users’ problems and consider each feature from a user’s perspective to create a Domain-Driven Design. 

For example, for an online fashion store mobile app, a unique problem that the store’s customers may be facing is they have to wander through multiple sections and scroll down long pages before finding what they want. 

To create a Domain-Driven Design that incorporates a design thinking approach, the team, including the developer, starts navigating the different stages from empathy to testing, aiming to create solutions specific to the domain. 

They then thoughtfully review all elements and organize them logically, leveraging their understanding of the rules and processes of the online fashion domain to make the customer’s journey on the e-store app as comfortable as possible. 

Design thinking is, thus, a unique way to create domain-driven software products. The combined approach of domain-centric solutions and design thinking helps you integrate your customer’s needs and business goals and develop solutions that address the problem as efficiently as possible. 

How to Approach Domain-Driven Design  

One of the most critical approaches to implementing a domain model is to ensure that your development team comprises skilled modelers, developers, and architects with top-notch Object-Oriented Design (OOD) and Programming (OOP) experience. The team must have all the required access to the subject matter experts and analysts with good business process modeling skills. 

To be effective and provide a good Return on Investment (ROI), the team must ensure that the Domain-Driven Design focuses on a specific business operational domain and synergizes with the application architecture and business strategies, norms, and processes unique to it. 

Domain-Driven Design should be reusable for preventing duplication and implementing core business elements of your domain. 

When developing the model, the developer must ensure there are no dependencies on the layers on the sides of the domain layer, such as the database and facade layers. The domain classes must be unit testable from inside the IDE and outside the container. 

Ideally, design using a POJO programming model sans technology or framework dependencies. Design for minimum dependencies on any infrastructure frameworks since it will outlast these frameworks. The idea is to avoid tight coupling on external frameworks. 

Models of Domain-Driven Design 

Models of Domain Driven Design

Domain-Driven Designs involve Strategic Design and Tactical Design. The latter is more popular with developers and programmers. These have been explained below: 

Strategic Design 

It helps solve problems related to software modeling while thinking in terms of a context that refers to the circumstances associated with an event, idea statement, or incident and in terms of which its meaning could be established. 

In addition, Strategic Design also includes the following elements: 

  • Model: Used to solve business-related problems, the model forms the base logic and defines different domain aspects. It’s used to solve problems related to that business. 
  • Ubiquitous Language: The team members use a common language to link all team activities related to the domain model. For example, using common words for classes, services, methods, and objects when interacting with experts and teammates. 
  • Bounded Context: This is a description of boundary limits within which a specific domain model is defined and applied. 

Tactical Design 

Tactical design is concerned with implementation details and typically cares for components within the bounded context. The Tactical Design approach helps in developing efficient domain models using the following building blocks: 

  • Entities: They are potentially changeable objects having a unique identifier. An entity enables you to obtain the entire transition history of this entity. The entity generally persists as a row in DB and consists of value objects in a programming context. 
  • Value Objects: Value Objects are immutable and do not have a unique identity. They perform complex calculations, isolating complex computational logic from entities. For example, when the User is an entity and Address is a value object, while the address may change multiple times, the User identity remains the same. When the Address is changed, the new Address will get instantiated and assigned to the User. 
  • Aggregates: Aggregates are based on entities and value objects. Aggregates are a cluster of one or more entities and may contain value objects. The parent entity of a cluster gets the name of the aggregate root. Comments on a post and banking transaction details are examples of aggregates and aggregate roots. 
  • Services: A service is a functionality that exists somewhere between entities and values objects but is related to neither. 
  • Repositories and factories: They help handle aggregates. While factories support the beginning of an aggregate’s lifecycle, repositories help manage the mid and end lifecycles of an aggregate. Thus, factories enable the creation of aggregates, and repositories support their persistence. Best practices suggest that a repository should always be created per aggregate root, but not for every entity. 
  • Domain Events: In general, an event refers to an object that represents an activity that has taken place. In Domain-Driven design, certain events directly related to the domain are called domain events. These events have to be addressed uniquely compared to non-domain events, for which the domain model will need to be modified accordingly. 

Terminologies in Domain-Driven Design 

terminologies

Conceptual clarity about Domain-Driven Designs can be enhanced through familiarity with core terminologies used. In addition to Domain Model, Bounded Context, and Ubiquitous Language, some other commonly used terms include: 

  • Subdomain – The domain model is further classified into subdomains, with each subdomain related to a specific domain element or issue being addressed by the digital product. 
  • Domain logic – Often known as ‘business logic,’ it’s a set of rules or processes that determine the creation, storage, and amendment of data consumed by the product. 
  • Design pattern – It refers to prior-written pieces of code that tackle different elements of the problem your product aims to address. If you split the issue into its individual challenges, it may be possible to leverage past design patterns to solve many of the challenges. 

Benefits of Adopting a Domain-Driven approach 

benefits of domain driven design

Where there are complex applications, a domain-driven approach  can lead to: 

  • Enhanced communication: Domain-Driven designs facilitate easier and clear communication among technical and non-technical team members. 
  • Support for your business goals: Having clear objectives about the desired business results of the digital product, you are better placed to create products that help you achieve desired results. 
  • Versatility: A modular and layered design structure supports the seamless implementation of updates, modifications, and modernization based on your needs. 
  • User-centric: By sustaining the domain at the core of the design process, a Domain-Driven Design enables products that cater to the needs of target audiences for whom the domain is most relevant. 
  • Practicality: The involvement of subject matter experts in Domain-Driven Design is more likely to help create a customer-centric product than when a developer working in isolation is expected to develop. 

How Does it Leverage our Product Engineering Practices?  

LTI is one of the leading technology consulting and digital solutions providers worldwide, with operations in 33 countries. 

Conceptualizing the software system in terms of specific business practices and using a Domain-Driven Design approach allows us to effectively utilize proven principles and patterns to address software and business challenges. 

Our domain solutions leverage diverse automation and Information Technology best practices, including (DDD) – aligned with global process standards – to offer our clients greater returns on assets, save costs, improve productivity and minimize execution time. 

By leveraging Domain-Driven Design in our product engineering practices, we have successfully accelerated the digital transformation journeys of our global clients. Get in touch to learn how we can help you achieve the same! 

Recommended Content

Go Back to Main Page