Understanding the Business Domain
Understanding the business is a fundamental requirement for building successful software solutions. As programmers and software engineers, we must understand how companies operate within their business. By analyzing the business domain, we can distill the different subdomains. This will help us to design good systems that are aligned with the business goals, so consequently, this will ensure the success of the business.
What is a Domain
A business domain refers to a company's primary area of operation. For instance, Starbucks is renowned for its coffee, while UPS offers global delivery services.
A company can operate in multiple business domains. For instance, Amazon operates in both retail and cloud computing.
What is a Subdomain
A subdomain is a specific area of a business. All of a company's subdomains together form the business domain. Implementing just one subdomain is not enough for a company to succeed. For example, Amazon needs both support and delivery services, depending on whether we look at retail or cloud computing.
What are the Different Types of Subdomains
In domain-driven design, we divide subdomains into three categories: core, generic, and supporting.
Core Subdomain
A core subdomain is what differentiates a company from another. A core subdomain is the innovation that a company introduces to gain an advantage over its competitors. For example, Google Search's ranking algorithm.
Core subdomains are also called core domains.
A core subdomain that is simple to implement is also simple to copy. Hence, it can only provide a short-term advantage over the competitors. Therefore, core subdomains must be complex. Using the Google example, the search's ranking algorithm is unique and hard to copy.
Keep in mind that core subdomains are not necessarily technical. Not all business problems are solved using software. For example, a carpenter may sell its products online.
Generic Subdomain
Generic subdomains are business activities that all companies do in the same way. There is no real need for innovation here. Ready-to-use implementations are widely available and used by all companies to cover these needs.
A good example is authentication and authorization. Most applications need this feature, so instead of building a new proprietary authentication system, it makes more sense to use an existing solution.
Supporting Subdomain
Supporting subdomains provide necessary functions that enable the core domain to operate effectively. However, they do not offer real competitive advantage or business differentiation.
The main criterion for distinguishing supporting subdomains is the complexity, they are quite simple to implement. They usually are CRUD-based systems.
Subdomain Comparison
Let's review the main differences between the three categories of subdomains.
- Competitive Advantage: Only core subdomains are game-changers for a company. Although all subdomains are required for the company to offer its services, only the core subdomain provides a real competitive advantage.
- Complexity: The most complex ones are the core subdomains as they must be unique. Competitors must not copy them as the company's profitability depends on it. Generic subdomains are also complex but not key for the success of the company, usually, these kinds of subdomains are the core subdomains for other companies solving that kind of problem. Finally, the supporting subdomains are quite simple to implement, usually, a CRUD-based interface is enough.
- Changeability: Core subdomains MUST change often. New features must be implemented frequently in the core subdomain to maintain a competitive advantage over the competitors.
- Implementation: Core subdomains must be implemented in-house. They cannot be outsourced. Implementing core subdomains in-house allows the company to implement features and evolve the solution quickly. The organization’s most experienced and qualified should be allocated to work on the core subdomain. Generic subdomains are hard but already solved problems, so buying an off-the-shelf is the best. As mentioned before, the Supporting subdomains are simple, so implementing one in-house using a rapid application development framework will be enough.
Finding the Subdomain Boundaries
Identifying the different subdomains is a key point while designing software solutions as it will help us to make the proper design decisions.
The different subdomains of a business must be defined by the company’s business strategy, which means, its business domains and how it differentiates itself from other companies in the same field.
Let's check some ways to find subdomain boundaries:
- Organization Units: The company’s departments and other organizational units are a good starting point. Each department may have unique concepts so analyzing them can help us to find subdomain boundaries.
- Set of Use Cases: Think about those use cases that usually involve the same actor, and entities, and perform operations over closely related data.
- Core Subdomain Isolation: It’s key to properly identify the core subdomains, defining the boundaries as much as possible since that will allow us to extract the generic and supporting functionalities
Conclusion
Understanding the business domain is crucial for software development success. By identifying subdomains, we design extensible, scalable, and maintainable solutions that power business success. Consider departments and use cases to define these boundaries effectively. The core subdomain isolation will help you to separate the other two easily. Remember, core subdomains must be built in-house, while generic ones benefit from off-the-shelf solutions. Supporting subdomains, though simpler, are essential for the overall functionality of the business.