How we discover and organise domains in an existing product

Introduction

Software companies and consultants like to flex their Domain Driven Design (DDD) muscles by throwing around terms like Domain, Subdomain and Bounded Context. But what lies behind these buzzwords, and how these apply to customers' diverse environments and needs, are often not as clear. As it turns out it takes a collaborative effort between stakeholders and development team(s) over a longer period of time on a regular basis to get them right. And when you think you have figured them out, your models and concepts will get challenged by the ever-changing landscape of business requirements.

So why even bother with these fancy DDD terms? Why do we need them and how can we identify them? Aren't they just different contexts after all?

In this post we'd like to take you on a journey of riding the DDD roller coaster in the land of HR where paying back technical debt and diving deeper into the domain are everyday challenges.

Context and Abstraction

Classifying and categorizing things is in our human nature. We put things into boxes so we can reduce our cognitive load when we have to reason about things that belong to a certain box. We label these boxes with certain rules, concepts, and conventions that apply when we step into that box. Just like these boxes can help us reducing the aforementioned cognitive load, the abstraction they introduce might hurt us eventually when the environment in which they were formed changes. So let's treat a context as one of these boxes, a subset of the world with a certain amount of abstraction.

Initial Situation

During the last 4 years, we built a structured monolith that serves the following areas within the HR domain:

  • Employee records

    • Capturing various types of talks, conversations, and interviews between employee, superiors and HR like general feedbacks, personal notes, highly confidential notes, warning letters and terminations.

  • Employee Development Talks

    • Schedule, plan and record the annual development talk between employee and superiors (personal goals, personal skills assessment).

  • Employee search

    • Provides a general entry point to various usecases by making employees searchable through their “publicly” available information like name, department, working site

  • Demand management

    • Superiors claim employee demand and HR outlines a strategy to fullfill this demand.

  • Competence management

    • Align public image and self-image regarding competences. Record skill development over time.

  • Self Service

    • Allow employees to easily get in touch with HR in a more controlled way than per E-Mail as well as to directly access and edit information (like personal data, personalized application forms, etc) about themselves

From this point on our mental model consisted of several subdomains however we started questioning if they were really separated or do they share some common boundary. Do Employee Development Talks belong to a general record main domain or are they related to competence management and may belong to an Employee Development area? How should we even start?

Techniques to find subdomains

There are several tricks and heuristics you can apply in clustering features into subdomains.

  • Ask: what is the purpose of a feature? Do the features share the same goal?

  • Who is working on features? If same people work on features there may be an indication that they belong together

  • What are the domain terms for a feature? Do you use the same ubiquitous language for the features? If yes they may be close together and solve similar issues

  • Define problem statements for each subdomain. Does every feature of the subdomain adhere to this statement?

Bottom-Up Approach

As our mental model revolved around mainly low-level contexts, we gave the bottom-up approach a chance.

  • Start with the lowest feature level

  • Cluster and classify features based on similarities

  • Find a headline for the new higher-level domain

  • Define a problem statement

EXCERPT OF OUR FIRST CLUSTERING APPROACH

Besides the yellow features, you can see some classification post-its. Such as core or generic domain, are records written ad-hoc or in a planned meeting, who is affected by a feature, and who drives the feature. Using heuristics for classification will lead to different clustering. In the end, we had too many ideas and models in our brains. At this point, we were not able to agree on what the primary property of our boundaries should be. Is it the type of users, the confidentiality of data, or some temporal aspect?

We found out that we are all too deep into the way the domain is currently modeled and that we need someone with a fresh and distant view on this topic. So we “hired” a colleague from our consulting department to support us and moderate the workshops.

THE SAME CONCEPTS CAN BELONG TO DIFFERENT DOMAINS (1)

Top Down Approaches

As the bottom-up approach did not deliver a clear picture we agreed to advance our model from a top-down view. Let’s start with the top-level domain and divide it into smaller pieces. Generally, HR is not a customer-specific domain, each company has some kind of HR department and will face similar tasks to solve. The next reasonable step was to search for existing ideas for structuring an HR domain.

Ask the AI

Let’s have a look at how ChatGPT 3.5 will answer the question “How would you structure the HR domain in subdomains”

Answer (shortened)

  1. Recruitment and Talent Acquisition

  2. Employee Engagement and Retention

  3. Performance Management

  4. Compensation and Benefits

  5. HR Operations

  6. Learning and Development

  7. Diversity, Equity, and Inclusion

Ask the Web

Additionally, we have found the following illustration in the literature that described Business Capabilities of the HR domain in general.

Our Version - Rework

Although these models were quite good we were skeptical to use them unreflected as is. However, they turned out to be good enough guidelines for our reworked model.

As the word employee kept coming up in different contexts, we decided to use it as our primary guidance in identifying our main categories. What does the customer mean by employee? Is it the same or is it different per context? As it turned out they mean quite different employee roles and that helped us shaping the boundaries around the possible sub-domains. At this point, it seemed obvious to integrate these different roles and their perspectives into our domain structure. After multiple iterations, the following final sub-domains were identified whereas some areas are not listed which are out of our product scope.

  • HR Strategie and planning

  • Organisation Development

  • Employee attraction and recruitment

  • Employee administration

  • Employee development

  • Relations

  • Analytics

Takeaways

Whether you follow a top-down or bottom-up approach can depend on which fits your domain better and the phase of your product/project is in. Trying out both as we did can also be a good path to take. It might be useful to evaluate existing models and validate them against your requirements. Clustering heuristics help you to get different views on your domain structure. It is preferred that you design more than one model and collaboratively work on the final outcome. Keep in mind that models will evolve over time. Continuous refinement is desired.

References

  1. Domain, Subdomain, Bounded Context, Problem/Solution Space in DDD: Clearly Defined

  2. Business Capability Map Example - Modeling Business Capabilities

 
Blog 12/19/22

Creating a Cross-Domain Capable ML Pipeline

As classifying images into categories is a ubiquitous task occurring in various domains, a need for a machine learning pipeline which can accommodate for new categories is easy to justify. In particular, common general requirements are to filter out low-quality (blurred, low contrast etc.) images, and to speed up the learning of new categories if image quality is sufficient. In this blog post we compare several image classification models from the transfer learning perspective.

Blog 11/12/20

Announcing Domain-Driven Design Exercises

Interested in Domain Driven Design? Then this DDD exercise is perfect for you!

Blog 10/6/21

Designing and Running a Workshop series: An outline

Learn how to design and execute impactful workshops. Discover tips, strategies, and a step-by-step outline for a successful workshop series.

Blog 4/16/24

The Intersection of AI and Voice Manipulation

The advent of Artificial Intelligence (AI) in text-to-speech (TTS) technologies has revolutionized the way we interact with written content. Natural Readers, standing at the forefront of this innovation, offers a comprehensive suite of features designed to cater to a broad spectrum of needs, from personal leisure to educational support and commercial use. As we delve into the capabilities of Natural Readers, it's crucial to explore both the advantages it brings to the table and the ethical considerations surrounding voice manipulation in TTS technologies.

Blog 8/31/20

Innovation Incubator at TIMETOACT GROUP Austria

Discover how our Innovation Incubator empowers teams to innovate with collaborative, week-long experiments, driving company-wide creativity and progress.

Blog 7/14/23

Event Sourcing with Apache Kafka

For a long time, there was a consensus that Kafka and Event Sourcing are not compatible with each other. So it might look like there is no way of working with Event Sourcing. But there is if certain requirements are met.

Blog 8/10/23

Machine Learning Pipelines

In this first part, we explain the basics of machine learning pipelines and showcase what they could look like in simple form. Learn about the differences between software development and machine learning as well as which common problems you can tackle with them.

Blog 5/25/21

From the idea to the product: The genesis of Skwill

We strongly believe in the benefits of continuous learning at work; this has led us to developing products that we also enjoy using ourselves. Meet Skwill.

Headerbild für lokale Entwicklerressourcen in Deutschland
Branche

On-site digitization partner for insurance companies

As TIMETOACT GROUP, we are one of the leading digitization partners for IT solutions in Germany, Austria and Switzerland. As your partner, we are there for you at 17 locations and will find the right solution on the path to digitization - gladly together in a personal exchange on site.

Blog 5/18/22

Introduction to Functional Programming in F#

Dive into functional programming with F# in our introductory series. Learn how to solve real business problems using F#'s functional programming features. This first part covers setting up your environment, basic F# syntax, and implementing a simple use case. Perfect for developers looking to enhance their skills in functional programming.

Blog 8/11/22

Part 1: TIMETOACT Logistics Hackathon - Behind the Scenes

A look behind the scenes of our Hackathon on Sustainable Logistic Simulation in May 2022. This was a hybrid event, running on-site in Vienna and remotely. Participants from 12 countries developed smart agents to control cargo delivery truck fleets in a simulated Europe.

Headerbild zur offenen und sicheren IT bei Versicherungen
Service

Open and secure IT

Just a few years ago, insurers were reluctant to move into the cloud or platform world. Concerns about security and governance often prevailed. The paradigm has changed.

Kompetenz

Digitalization and optimization in the manufacturing industr

The TIMETOACT GROUP is a leading provider of solutions for the manufacturing industry. We are proud to offer our customers innovative technologies and services that optimize their manufacturing processes and increase their competitiveness.

Blog 9/27/22

Creating solutions and projects in VS code

In this post we are going to create a new Solution containing an F# console project and a test project using the dotnet CLI in Visual Studio Code.

Process Integration & Automation
Service

Process Integration & Automation

Digitizing and improving business processes and reacting to changes in an agile way – these are the challenges that more and more companies need to face.

Blog 11/22/22

Part 1: Detecting Truck Parking Lots on Satellite Images

Real-time truck tracking is crucial in logistics: to enable accurate planning and provide reliable estimation of delivery times, operators build detailed profiles of loading stations, providing expected durations of truck loading and unloading, as well as resting times. Yet, how to derive an exact truck status based on mere GPS signals?

Blog 4/17/23

Running Hybrid Workshops

When modernizing or building systems, one major challenge is finding out what to build. In Pre-Covid times on-site workshops were a main source to get an idea about ‘the right thing’. But during Covid everybody got used to working remotely, so now the question can be raised: Is it still worth having on-site, physical workshops?

Blog 6/27/23

Boosting speed of scikit-learn regression algorithms

The purpose of this blog post is to investigate the performance and prediction speed behavior of popular regression algorithms, i.e. models that predict numerical values based on a set of input variables.

Blog 9/14/22

Learn & Share video Obsidian

Knowledge is very powerful. So, finding the right tool to help you gather, structure and access information anywhere and anytime, is rather a necessity than an option. You want to accomplish your tasks better? You want a reliable tool which is easy to use, extendable and adaptable to your personal needs? Today I would like to introduce you to the knowledge management system of my choice: Obsidian.

Blog 9/17/21

How to gather data from Miro

Learn how to gather data from Miro boards with this step-by-step guide. Streamline your data collection for deeper insights.