What is a Domain?

Learn the meaning of domain and its importance in the Domain Driven Design world.

Everyone in technology always talks about the importance of understanding the context of the problem they are trying to solve. It is almost the rule of thumb. Despite being very important, overlooking this step is common when solving a problem. Going further and trying to solve it beyond the programming context, is even more complex. It means that when it comes to modeling a business process with many steps, people and teams involved, it is a tough task. Here is when Domain Driven Design comes to the rescue.

Defining a Domain

In the coming lessons, Domain Driven Design will be analyzed deeply, but for now, let us understand what a Domain is. According to the Oxford Dictionary, a domain is “an area of knowledge or activity; especially one that somebody is responsible for”. This definition seems a little puzzling. Thus let us make it clear. The definition of the Domain is very abstract. However, it is nothing but a context where there are some activities involved. Additionally, there are people or things in charge of executing those activities. In other words, a domain is a set of activities or processes and experts in executing those activities. Also, a domain can be as large or as small as necessary. Let us look at a couple of examples to understand the concept of Domain better.

Understanding the meaning of domain by examples

According to the previous definition, let us look at some domain examples to make the domain term completely clear.

Banking services

The first example is related to banking services. A bank consists of many activities such as loans and account management, ATM, payroll, customers, etc. In terms of responsibilities, each activity is executed by an expert who knows how to carry out the activity in the best way:

The image above shows some activities that can be involved when it comes to analyzing a bank. In this case, it shows loan, credit card, account, employee, and ATM. It is important to clarify that some activities can be part of the core business processes, and some can give support to main activities.

E-commerce services

The second example is related to an e-commerce site. This type of company consists of a huge number of activities too. The image below shows some activities that can be encountered on an e-commerce site. It can have payments, website development, shipments, stock, and sales. Each of those activities is executed by an expert.

Summary

A domain in Domain Driven Design is the field or industry in which a company operates, and depending on the sector, a domain can account for many and different parts. If people understand the domain they are modeling, they will be successful at Domain Driven Design.