烂翻译系列之学习领域驱动设计——第一章:分析业务逻辑

If you are anything like me, you love writing code: solving complex problems, coming up with elegant solutions, and constructing whole new worlds by carefully crafting their rules, structures, and behavior. I believe that’s what interested you in domain-driven design (DDD): you want to be better at your craft. This chapter, however, has nothing to do with writing code. In this chapter, you will learn how companies work: why they exist, what goals they are pursuing, and their strategies for achieving their goals.

如果你像我一样,喜欢编写代码: 解决复杂的问题,提出优雅的解决方案,通过精心设计规则、结构和行为来构建全新的世界。我相信这就是你对领域驱动设计(DDD)感兴趣的原因: 你想提高你的技艺。然而,本章与编写代码无关。在本章中,你将了解公司是如何运作的: 它们为什么存在,它们追求的目标是什么,以及它们实现目标的策略。

When I teach this material in my domain-driven design classes, many students actually ask, “Do we need to know this material? We are writing software, not running businesses.” The answer to their question is a resounding “yes.” To design and build an effective solution, you have to understand the problem. The problem, in our context, is the software system we have to build. To understand the problem, you have to understand the context within which it exists— the organization’s business strategy, and what value it seeks to gain by building the software.

当我在我的领域驱动设计课程中教授这部分内容时,许多学生会问: “我们需要了解这些东西吗?我们是在编写软件,而不是经营企业。”对于他们的问题,我的答案是肯定的“需要”,要设计和构建有效的解决方案,您必须了解问题。此处,问题就是我们需要构建的软件系统。要理解这个问题,你必须了解它存在的背景ーー组织的商业战略,以及它希望通过构建软件来获得的价值。

In this chapter, you will learn domain-driven design tools for analyzing a company’s business domain and its structure: its core, supporting, and generic subdomains. This material is the groundwork for designing software. In the remaining chapters, you will learn the different ways these concepts affect software design.

在本章中,你将学习分析公司业务领域及其结构(业务领域的核心子域、支撑子域和通用子域)的领域驱动设计工具。业务领域是设计软件的基础。在后续的章节中,你将学习这些概念如何以不同的方式影响软件设计。

What Is a Business Domain?

业务领域是什么?

A business domain defines a company’s main area of activity. Generally speaking, it’s the service the company provides to its clients. For example:

业务领域定义了公司的主要活动领域。一般来说,它就是公司为客户提供的服务。例如:

  • FedEx provides courier delivery.  联邦快递提供快递服务。
  • Starbucks is best known for its coffee.  星巴克以其咖啡而闻名。
  • Walmart is one of the most widely recognized retail establishments.  沃尔玛是最广泛认可的零售机构之一。

A company can operate in multiple business domains. For example, Amazon provides both retail and cloud computing services. Uber is a rideshare company that also provides food delivery and bicycle-sharing services.

一家公司可以在多个业务领域中开展业务。例如,亚马逊同时提供零售和云计算服务。Uber 是一家拼车公司,同时也提供送餐和共享单车服务。

It’s important to note that companies may change their business domains often. A canonical example of this is Nokia, which over the years has operated in fields as diverse as wood processing, rubber manufacturing, telecommunications, and mobile communications.

值得注意的是,公司可能会经常改变他们的业务领域。诺基亚就是一个典型的例子,多年来,该公司在木材加工、橡胶制造、电信和移动通信等多个领域开展业务。

What Is a Subdomain?

子域是什么?

To achieve its business domain’s goals and targets, a company has to operate in multiple subdomains. A subdomain is a fine-grained area of business activity. All of a company’s subdomains form its business domain: the service it provides to its customers. Implementing a single subdomain is not enough for a company to succeed; it’s just one building block in the overarching system. The subdomains have to interact with each other to achieve the company’s goals in its business domain. For example, Starbucks may be most recognized for its coffee, but building a successful coffeehouse chain requires more than just knowing how to make great coffee. You also have to buy or rent real estate at effective locations, hire personnel, and manage finances, among other activities. None of these subdomains on its own will make a profitable company. All of them together are necessary for a company to be able to compete in its business domain(s).

为了实现其业务领域的目标和宗旨,一个公司必须在多个子领域中运营。子域是业务活动的细粒度区域。公司的所有子域组成了它的业务域: 即其为客户提供的服务。实现单个子域不足以让公司获得成功; 它只是整个系统中的一个构件。子域必须相互配合,以实现公司在其业务领域的目标。例如,星巴克可能最为人熟知的是它的咖啡,但建立一个成功的咖啡连锁店并不仅仅需要知道如何制作优质咖啡。还必须在聚集人流的位置购买或租赁房地产,雇用人员,管理财务,以及其他活动。这些子领域中的任何一个单独来看都无法使公司盈利。将所有这些子域整合在一起,才能使公司在其业务领域中具备竞争力。

Types of Subdomains

子域的类型

Just as a software system comprises various architectural components—databases, frontend applications, backend services, and others—subdomains bear different strategic/business values. Domain-driven design distinguishes between three types of subdomains: core, generic, and supporting. Let’s see how they differ from a company strategy point of view.

正如软件系统包括各种架构组件——数据库、前端应用程序、后端服务等——各个子域承载着不同的战略/业务价值。领域驱动设计把子域分为三类: 核心子域、通用子域和支撑子域。让我们从公司战略的角度来看一下它们之间的差异。

Core subdomains

核心子域

A core subdomain is what a company does differently from its competitors. This may involve inventing new products or services or reducing costs by optimizing existing processes.

核心子域是指一家公司与其竞争对手所做的不同之处。这可能包括发明新产品或服务,或通过优化现有流程来降低成本。

Let’s take Uber as an example. Initially, the company provided a novel form of transportation: ridesharing. As its competitors caught up, Uber found ways to optimize and evolve its core business: for example, reducing costs by matching riders heading in the same direction.

让我们以 Uber 为例。最初,该公司提供了一种新型的交通方式: 拼车。随着竞争对手的追赶,Uber找到了优化和发展其核心业务的方法: 例如,通过匹配前进方向相同的乘客来降低成本。

Uber’s core subdomains affect its bottom line. This is how the company differentiates itself from its competitors. This is the company’s strategy for providing better service to its customers and/or maximizing its profitability. To maintain a competitive advantage, core subdomains involve inventions, smart optimizations, business know-how, or other intellectual property.

Uber的核心子域影响着其盈亏底线。这就是Uber如何有别与竞争对手。这是公司为客户提供更好的服务和/或最大化其盈利能力的战略。为了保持竞争优势,核心子域包括发明、智能优化、商业知识或其他知识产权。

Consider another example: Google Search’s ranking algorithm. At the time of this writing, Google’s advertising platform accounts for the majority of its profits. That said, Google Ads is not a subdomain, but rather a separate business domain with subdomains comprising it, among its cloud computing service (Google Cloud Platform), productivity and collaboration tools (Google Workspaces), and other fields in which Alphabet, Google’s parent company, operates. But what about Google Search and its ranking algorithm? Although the search engine is not a paid service, it serves as the largest display platform for Google Ads. Its ability to provide excellent search results is what drives traffic, and subsequently, it is an important component of the Ads platform. Serving suboptimal search results due to a bug in the algorithm or a competitor coming up with an even better search service will hurt the ad business’s revenue. So, for Google, the ranking algorithm is a core subdomain.

思考另一个例子: 谷歌搜索的排名算法。在撰写本书时,谷歌的广告平台占其利润的大部分。也就是说,谷歌广告不是一个子域,而是一个独立的业务领域,它拥有自己的子域,包括其云计算服务(Google Cloud Platform)、生产力和协作工具(Google Workspaces),以及Google母公司Alphabet运营的其他领域。但是谷歌搜索和它的排名算法呢?虽然这个搜索引擎不是付费服务,但它是谷歌广告最大的展示平台。它提供出色的搜索结果的能力是吸引流量的关键,因此,它是广告平台的重要组成部分。由于算法中的错误或竞争对手推出更好的搜索服务而导致搜索结果不佳,将损害广告业务的收入。因此,对谷歌来说,排名算法是一个核心子域。

Complexity

复杂度

A core subdomain that is simple to implement can only provide a short-lived competitive advantage. Therefore, core subdomains are naturally complex. Continuing with the Uber example, the company not only created a new marketspace with ridesharing, it disrupted a decades-old monolithic architecture, the taxi industry, through targeted use of technology. By understanding its business domain, Uber was able to design a more reliable and transparent method of transportation. There should be high entry barriers for a company’s core business; it should be hard for competitors to copy or imitate the company’s solution.

一个易于实现的核心子域只能提供短暂的竞争优势。因此,核心子域自然是复杂的。继续以Uber为例,该公司不仅通过拼车服务创造了一个新的市场空间,还通过有针对性的技术使用,颠覆了已有数十年历史的出租车行业的单一架构。通过了解自己的商业领域,Uber能够设计出一种更可靠、更透明的交通方式。公司的核心业务应该有很高的进入壁垒; 竞争对手应该很难复制或模仿公司的解决方案。

Sources of competitive advantage

竞争优势的来源

It’s important to note that core subdomains are not necessarily technical. Not all business problems are solved through algorithms or other technical solutions. A company’s competitive advantage can come from various sources.

值得注意的是,核心子域不一定是技术性的。并非所有的业务问题都是通过算法或其他技术解决方案来解决的。一个公司的竞争优势可能来自各种来源。

Consider, for example, a jewelry maker selling its products online. The online shop is important, but it’s not a core subdomain. The jewelry design is. The company can use an existing off-the-shelf online shop engine, but it cannot outsource the design of its jewelry. The design is the reason customers buy the jewelry maker’s products and remember the brand.

例如,考虑一个在线销售珠宝的制造商。在线商店很重要,但它不是核心子域。珠宝设计才是。该公司可以使用现有的现成的在线商店引擎,但它不能外包其珠宝的设计。珠宝设计是顾客购买珠宝制造商的产品并记住该品牌的原因。

As a more intricate example, imagine a company that specializes in manual fraud detection. The company trains its analysts to go over questionable documents and flag potential fraud cases. You are building the software system the analysts are working with. Is it a core subdomain? No. The core subdomain is the work the analysts are doing. The system you are building has nothing to do with fraud analysis, it just displays the documents and tracks the analysts’ comments.

作为一个更复杂的例子,想象一家专门从事人工欺诈检测的公司。该公司培训其分析师检查可疑文件并标记潜在的欺诈案件。你正在构建分析师使用的软件系统。这是核心子域吗?不是。核心子域是分析师正在做的工作。你正在构建的系统与欺诈分析无关,它只是显示文件并跟踪分析师的评论。


CORE SUBDOMAIN VERSUS CORE DOMAIN

核心子域与核心领域

Core subdomains are also called core domains. For example, in the original domain-driven design book, Eric Evans uses “core subdomain” and “core domain” interchangeably. Although the term “core domain” is used often, I prefer to use “core subdomain” for a number of reasons. First, it is a subdomain, and I prefer to avoid confusion with business domains. Second, as you will learn in Chapter 11, it’s not uncommon for subdomains to evolve over time and change their types. For example, a core subdomain can turn into a generic subdomain. Hence, saying that “a generic subdomain has evolved into a core subdomain” is more straightforward than saying “a generic subdomain has evolved into a core domain.”

核心子域也称为核心领域。例如,在最初的领域驱动设计书籍中,Eric Evans交替使用“核心子领域”和“核心领域”这两个术语。尽管“核心领域”这个术语经常被使用,但出于多种原因,我更喜欢使用“核心子域”。首先,它是一个子域,我希望避免与业务域混淆。其次,正如您将在第11章中学到的,子域随着时间的推移而发展并改变其类型并不罕见。例如,核心子域可以转换为通用子域。因此,说“一个通用子域已经发展成为一个核心子域”比说“一个通用子域已经发展成为一个核心领域”更直接。


Generic subdomains

通用子域

Generic subdomains are business activities that all companies are performing in the same way. Like core subdomains, generic subdomains are generally complex and hard to implement.

通用子域是所有公司以相同方式进行的商业活动。与核心子域一样,通用子域通常也很复杂且难以实施。

However, generic subdomains do not provide any competitive edge for the company. There is no need for innovation or optimization here: battle-tested implementations are widely available, and all companies use them.

然而,通用子域并不为公司提供任何竞争优势。在这里不需要创新或优化:经过考验的实现方案是广泛可用的,所有公司都在使用它们。

For example, most systems need to authenticate and authorize their users. Instead of inventing a proprietary authentication mechanism, it makes more sense to use an existing solution. Such a solution is likely to be more reliable and secure since it has already been tested by many other companies that have the same needs.

例如,大多数系统需要对其用户进行身份验证和授权。与其发明专有的身份验证机制,不如使用现有的解决方案。这种解决方案可能更加可靠和安全,因为它已经被许多其他有同样需求的公司测试过了。

Going back to the example of a jewelry maker selling its products online, jewelry design is a core subdomain, but the online shop is a generic subdomain. Using the same online retail platform—the same generic solution—as its competitors would not impact the jewelry maker’s competitive advantage.

回到珠宝制造商在网上销售产品的例子,珠宝设计是一个核心子域,但是网上商店是一个通用子域。与竞争对手使用相同的在线零售平台——相同的通用解决方案——不会影响珠宝制造商的竞争优势。

Supporting subdomains

支撑子域

As the name suggests, supporting subdomains support the company’s business. However, contrary to core subdomains, supporting subdomains do not provide any competitive advantage.

顾名思义,支撑子域支撑公司的业务。然而,与核心子域相反,支撑子域不提供任何竞争优势。

For example, consider an online advertising company whose core subdomains include matching ads to visitors, optimizing the ads’ effectiveness, and minimizing the cost of ad space. However, to achieve success in these areas, the company needs to catalog its creative materials. The way the company stores and indexes its physical creative materials, such as banners and landing pages, does not impact its profits. There is nothing to invent or optimize in that area. On the other hand, the creative catalog is essential for implementing the company’s advertising management and serving systems. That makes the content cataloging solution one of the company’s supporting subdomains.

例如,考虑一家在线广告公司,其核心子域包括将广告与访问者匹配、优化广告效果以及最大限度地降低广告空间成本。但是,为了在这些领域取得成功,公司需要对其创意素材进行分类。该公司存储和索引其实体创意素材(例如横幅和登录页面)的方式不会影响其利润。在这个领域没有什么需要发明或优化的。另一方面,创意目录对于实施公司的广告管理和投放系统至关重要。这使得内容分类解决方案成为公司的支撑子域之一。

The distinctive characteristic of supporting subdomains is the complexity of the solution’s business logic. Supporting subdomains are simple. Their business logic resembles mostly data entry screens and ETL (extract, transform, load) operations; that is, the so-called CRUD (create, read, update, and delete) interfaces. These activity areas do not provide any competitive advantage for the company, and therefore do not require high entry barriers.

支撑子域的显著特征是解决方案业务逻辑的复杂性。支撑子域很简单。它们的业务逻辑非常类似于数据录入屏幕和 ETL(提取、转换、加载)操作;即所谓的 CRUD(创建、读取、更新和删除)接口。这些活动领域不会为公司提供任何竞争优势,因此不需要很高的进入壁垒。

Comparing Subdomains

比较子域

Now that we have a greater understanding of the three types of business subdomains, let’s explore their differences from additional angles and see how they affect strategic software design decisions.

现在我们对这三种类型的业务子域有了更深入的了解,让我们从其他角度探讨它们的差异,看看它们如何影响战略性软件设计决策。

Competitive advantage

竞争优势

Only core subdomains provide a competitive advantage to a company. Core subdomains are the company’s strategy for differentiating itself from its competitors.

只有核心子域才能为公司提供竞争优势。核心子域是公司区别于竞争对手的战略。

Generic subdomains, by definition, cannot be a source for any competitive advantage. These are generic solutions—the same solutions used by the company and its competitors.

根据定义,通用子域不能成为任何竞争优势的来源。这些都是通用的解决方案——与该公司及其竞争对手使用的解决方案相同。

Supporting subdomains have low entry barriers and cannot provide a competitive advantage either. Usually, a company wouldn’t mind its competitors copying its supporting subdomains— this won’t affect its competitiveness in the industry. On the contrary, strategically the company would prefer its supporting subdomains to be generic, ready-made solutions, thus eliminating the need to design and build their implementation. You will learn in detail about such cases of supporting subdomains turning into generic subdomains, as well as other possible permutations, in Chapter 11. A real-life case study of such a scenario will be outlined in Appendix A.

支撑子域的进入门槛较低,也无法提供竞争优势。通常,公司不会介意其竞争对手复制其支撑子域——这不会影响其在行业中的竞争力。相反,从战略上讲,公司更希望它的支撑子域是通用的、现成的解决方案,从而消除了设计和构建实现的需要。您将在第11章详细了解支撑子域变成通用子域的情况,以及其他可能的转变。关于这种情况的实际案例研究将在附录 A 中概述。

The more complex the problems a company is able to tackle, the more business value it can provide. The complex problems are not limited to delivering services to consumers. A complex problem can be, for example, making the business more optimized and efficient. For example, providing the same level of service as competitors do, but at lower operational costs, is a competitive advantage as well.

一家公司能够解决的问题越复杂,其提供的商业价值就越大。复杂的问题不仅限于向消费者提供服务。例如,解决一个复杂的问题可以使业务更加优化和高效。例如,以比竞争对手更低的运营成本提供同等水平的服务,也是一种竞争优势。

Complexity

复杂度

From a more technical perspective, it’s important to identify the organization’s subdomains, because the different types of subdomains have different levels of complexity. When designing software, we have to choose tools and techniques that accommodate the complexity of the business requirements. Therefore, identifying subdomains is essential for designing a sound software solution.

从更技术的角度来看,识别组织的子域很重要,因为不同类型的子域有不同的复杂度。在设计软件时,我们必须选择适应业务需求复杂性的工具和技术。因此,识别子域对于设计一个健全的软件解决方案至关重要。

Supporting subdomains’ business logic is simple. These are basic ETL operations and CRUD interfaces, and the business logic is obvious. Often, it doesn’t go beyond validating inputs or converting data from one structure to another.

支撑子域的业务逻辑很简单。这些是基本的 ETL 操作和 CRUD 接口,业务逻辑是显而易见的。通常,它不会超出验证输入或将数据从一个结构转换到另一个结构的范围。

Generic subdomains are much more complicated. There should be a good reason why others have already invested time and effort in solving these problems. These solutions are neither simple nor trivial. Consider, for example, encryption algorithms or authentication mechanisms.

通用子域要复杂得多。这就是为什么其他人已经投入了时间和精力来解决这些问题。这些解决方案既不简单也不平凡。例如,加密算法或身份验证机制就是这样的情况。

From a knowledge availability perspective, generic subdomains are “known unknowns.” These are the things that you know you don’t know. Furthermore, this knowledge is readily available. You can either use industry-accepted best practices or, if needed, hire a consultant specializing in the area to help design a custom solution.

从知识可用性的角度来看,通用子域是“已知的未知数”。这些事情你自知你不懂。此外,这方面的知识也很容易获得。您可以使用业界公认的最佳实践,或者,如果需要的话,聘请该领域的专业顾问来帮助设计定制解决方案。

Core subdomains are complex. They should be as hard for competitors to copy as possible—the company’s profitability depends on it. That’s why strategically, companies are looking to solve complex problems as their core subdomains.

核心子域很复杂。对于竞争对手来说,它们应该是难以复制的——公司的盈利能力取决于此。这就是为什么从战略上讲,公司都把解决复杂问题作为其核心领域。

At times it may be challenging to differentiate between core and supporting subdomains. Complexity is a useful guiding principle. Ask whether the subdomain in question can be turned into a side business. Would someone pay for it on its own? If so, this is a core subdomain. Similar reasoning applies for differentiating supporting and generic subdomains: would it be simpler and cheaper to hack your own implementation, rather than integrating an external one? If so, this is a supporting subdomain.

有时,区分核心子域和支撑子域可能具有挑战性。复杂度是一个有用的指导准则。问问自己有关子域是否可以转变为副业。会有人为它支付费用(投资)吗?如果是,这是一个核心子域。类似的推理也适用于区分支撑子域和通用子域:与集成外部子域相比,自己的实现是否更简单、更便宜?如果是,这是一个支撑子域。

From a more technical perspective, it’s important to identify the core subdomains whose complexity will affect software design. As we discussed earlier, a core subdomain is not necessarily related to software. Another useful guiding principle for identifying softwarerelated core subdomains is to evaluate the complexity of the business logic that you will have to model and implement in code. Does the business logic resemble CRUD interfaces for data entry, or do you have to implement complex algorithms or business processes orchestrated by complex business rules and invariants? In the former case, it’s a sign of a supporting subdomain, while the latter is a typical core subdomain.

从更技术的角度来看,识别核心子域非常重要,其复杂性将影响软件设计。正如我们前面所讨论的,核心子域不一定与软件相关。识别与软件相关的核心子域的另一个有用的指导原则是评估必须在代码中建模和实现的业务逻辑的复杂度。业务逻辑是否类似于数据输入的 CRUD 接口,还是必须实现由复杂业务规则和不变性协调的复杂算法或业务流程?前一种情况,它是一个支撑子域的标志,而后者是一个典型的核心子域。

文心一言:从更技术的角度来看,识别复杂度会影响软件设计的核心子领域很重要。正如我们之前讨论的,核心子领域不一定与软件相关。识别与软件相关的核心子领域的另一个有用的指导原则是评估您必须在代码中建模和实现的业务逻辑的复杂度。业务逻辑是否类似于数据输入的CRUD接口,还是您必须实现由复杂的业务规则和不变性协调的复杂算法或业务流程?在前者的情况下,这是一个支持性子领域的迹象,而后者则是一个典型的核心子领域。

The chart in Figure 1-1 represents the interplay between the three types of subdomains in terms of business differentiation and business logic complexity. The intersection between the supporting and generic subdomains is a gray area: it can go either way. If a generic solution exists for a supporting subdomain’s functionality, the resultant subdomain type depends on whether it’s simpler and/or cheaper to integrate the generic solution than it is to implement the functionality from scratch.

图1-1中的图表表示了三种子域之间在业务差异化和业务逻辑复杂性方面的相互作用。支撑子域和通用子域之间的交集是一个灰色地带: 它可以向任何一个方向发展。如果存在支撑子域功能的通用解决方案,那么结果子域类型取决于集成通用解决方案是否比从头开始实现功能更简单和/或更便宜。

 

 Figure 1-1. The business differentiation and business logic complexity of the three types of subdomains

 图1-1。三类子域的业务差异化和业务逻辑复杂性

Volatility

波动性

As mentioned previously, core subdomains can change often. If a problem can be solved on the first attempt, it’s probably not a good competitive advantage—competitors will catch up fast. Consequently, solutions for core subdomains are emergent. Different implementations have to be tried out, refined, and optimized. Moreover, the work on core subdomains is never done. Companies continuously innovate and evolve core subdomains. The changes come in the form of adding new features or optimizing existing functionality. Either way, the constant evolution of its core subdomains is essential for a company to stay ahead of its competitors.

如前所述,核心子域可能会经常发生变化。如果一个问题能够在第一次尝试中就解决,这可能不是一个好的竞争优势——竞争对手会很快赶上来。因此,核心子领域的解决方案是逐渐浮现的。需要尝试不同的实现方式,进行改进和优化。此外,核心子域的工作永远没有终点。公司不断创新和发展核心子域。这些变化以添加新特性或优化现有功能的形式出现。不管怎样,核心子域的不断发展对于一家公司保持领先于竞争对手至关重要。

Contrary to the core subdomains, supporting subdomains do not change often. They do not provide any competitive advantage for the company, and therefore the evolution of a supporting subdomain provides a minuscule business value compared to the same effort invested in a core subdomain.

与核心子域相反,支撑子域不经常变化。它们不能为公司提供任何竞争优势,因此,与投资于核心子域的相同努力相比,支撑子域的演变只能提供微不足道的业务价值。

Despite having existing solutions, generic subdomains can change over time. The changes can come in the form of security patches, bug fixes, or entirely new solutions to the generic problems.

尽管有现成的解决方案,通用子域可能随着时间的推移而变化。这些变化可能是安全补丁、错误修复或针对一般问题的全新解决方案。

Solution strategy

解决策略

Core subdomains provide the company its ability to compete with other players in the industry. That’s a business-critical responsibility, but does it mean that supporting and generic subdomains are not important? Of course not. All subdomains are required for the company to work in its business domain. The subdomains are like foundational building blocks: take one away and the whole structure may fall down. That said, we can leverage the inherent properties of the different types of subdomains to choose implementation strategies to implement each type of subdomain in the most efficient manner.

核心子域为公司提供了与业内其他参与者竞争的能力。这是一项至关重要的业务责任,但这是否意味着支撑子域和通用子域不重要? 当然不是。公司要在其业务领域中运作,所有子领域都是必需的。这些子域就像是基础构件: 拿走一个,整个结构就可能倒塌。也就是说,我们可以利用不同类型的子域的固有特性来选择实施策略,以最高效的方式实施每种类型的子域。

Core subdomains have to be implemented in-house. They cannot be bought or adopted; that would undermine the notion of competitive advantage, as the company’s competitors would be able to do the same.

核心子域必须在公司内部实现。它们不能购买或从别处拿来用; 这将削弱竞争优势,因为公司的竞争对手也能做到这一点。

It would also be unwise to outsource the implementation of a core subdomain. It is a strategic investment. Cutting corners on a core subdomain is not only risky in the short term but can have fatal consequences in the long run: for example, unmaintainable codebases that cannot support the company’s goals and objectives. The organization’s most skilled talent should be assigned to work on its core subdomains. Furthermore, implementing core subdomains inhouse allows the company to make changes and evolve the solution more quickly, and therefore build the competitive advantage in less time.

将核心子域的实现外包出去也是不明智的。这是一项战略投资。在核心子域上走捷径不仅在短期内有风险,长期来看也可能产生致命的后果:例如,不可维护的代码库无法支持公司的目标和愿景。组织中最优秀的人才应该被分配去处理核心子域的工作。此外,公司内部实现核心子域可以让公司更快地进行改变和演化解决方案,从而在更短的时间内建立竞争优势。

Since core subdomains’ requirements are expected to change often and continuously, the solution must be maintainable and easy to evolve. Thus, core subdomains require implementation of the most advanced engineering techniques.

由于核心子域的需求预计会经常和持续地变化,因此解决方案必须是可维护的,并且易于演进。因此,核心子域需要采用最先进的工程技术。

Since generic subdomains are hard but already solved problems, it’s more cost-effective to buy an off-the-shelf product or adopt an open source solution than invest time and effort into implementing a generic subdomain in-house.

由于通用子领域是困难但已经解决的问题,因此购买现成的产品或采用开源解决方案比投入时间和精力在内部实现通用子域更具成本效益。

Lack of competitive advantage makes it reasonable to avoid implementing supporting subdomains in-house. However, unlike generic subdomains, no ready-made solutions are available. So, a company has no choice but to implement supporting subdomains itself. That said, the simplicity of the business logic and infrequency of changes make it easy to cut corners.

由于缺乏竞争优势,因此有理由避免在公司内部实施支撑子域。但是,与通用子域不同,没有现成的解决方案可用。因此,公司别无选择,只能自己实现支撑子域。也就是说,业务逻辑的简单性和变更的不频繁性使得它很容易走捷径。

Supporting subdomains do not require elaborate design patterns or other advanced engineering techniques. A rapid application development framework will suffice to implement the business logic without introducing accidental complexities.

支撑子域不需要复杂的设计模式或其他高级工程技术。快速应用程序开发框架足以实现业务逻辑,而不会引入不必要的复杂性。

From a staffing perspective, supporting subdomains do not require highly skilled technical aptitude and provide a great opportunity to train up-and-coming talent. Save the engineers on your team who are experienced in tackling complex challenges for the core subdomains. Finally, the simplicity of the business logic makes supporting subdomains a good candidate for outsourcing.

从人员配置的角度来看,支撑子域不需要高度熟练的技术能力,而且提供了训练新进人才的大好机会。将团队中经验丰富的工程师保留下来,以应对核心子领域的复杂挑战。最后,业务逻辑的简单性使支撑子域成为外包的合适选择。

Table 1-1 summarizes the aspects in which the three types of subdomains differ.

表1-1总结了三种子域不同的方面。

Table1-1.The differences between the three types of subdomains

表1-1. 三种子域之间的差异

Subdomain type  子域类型 Competitive advantage  竞争优势 Complexity  复杂度 Volatility  波动性 Implementation  实现 Problem  问题
Core  核心子域 Yes  是 High  高 High  高 In-house  内部 Interesting  有趣的
Generic  通用子域 No  否 High  高 Low  低 Buy/adopt  购买/拿来使用 Solved  已解决
Supporting  支撑子域 No  否 Low  低 Low  低 In-house/outsource  内部/外包 Obvious  平淡无奇的

Identifying Subdomain Boundaries

确定子域边界

As you can already see, identifying subdomains and their types can help considerably in making different design decisions when building software solutions. In later chapters, you will learn even more ways to leverage subdomains to streamline the software design process. But how do we actually identify the subdomains and their boundaries?

正如您已经看到的,在构建软件解决方案时,识别子域及其类型可以极大地帮助您做出不同的设计决策。在后面的章节中,您将学到更多利用子域来简化软件设计过程的方法。但是我们如何识别子域及其边界呢?

The subdomains and their types are defined by the company’s business strategy: its business domains and how it differentiates itself to compete with other companies in the same field. In the vast majority of software projects, in one way or another the subdomains are “already there.” That doesn’t mean, however, that it is always easy and straightforward to identify their boundaries. If you ask a CEO for a list of their company’s subdomains, you will probably receive a blank stare. They are not aware of this concept. Therefore, you’ll have to do the domain analysis yourself to identify and categorize the subdomains at play.

子域及其类型由公司的业务战略来定义: 它的业务领域及其如何与同一领域的其他公司进行竞争。在绝大多数的软件项目中,子域以这样或那样的方式“已经存在”。然而,这并不意味着确定它们的边界总是容易和直接的。如果你向一位首席执行官索要一份他们公司子域的清单,你可能会收到一道茫然的目光。他们没有意识到这个概念。因此,您必须自己进行领域分析,以识别和分类正在使用的子域。

A good starting point is the company’s departments and other organizational units. For example, an online retail shop might include warehouse, customer service, picking, shipping, quality control, and channel management departments, among others. These, however, are relatively coarse-grained areas of activity. Take, for example, the customer service department. It’s reasonable to assume that it would be a supporting, or even a generic subdomain, as this function is often outsourced to third-party vendors. But is this information enough for us to make sound software design decisions?

一个好的起点是公司的各个部门和其他组织单位。例如,在线零售商店可能包括仓库、客户服务、拣货、拣货、发货、质量控制和渠道管理部门等。然而,这些都是相对粗粒度的活动领域。以客户服务部门为例。可以合理地假设它是一个支撑子域,甚至是一个通用子域,因为这个功能通常外包给第三方供应商。但是这些信息是否足以让我们做出合理的软件设计决策吗?

Distilling subdomains

提炼子域

Coarse-grained subdomains are a good starting point, but the devil is in the details. We have to make sure we are not missing important information hidden in the intricacies of the business function.

粗粒度的子域是一个很好的起点,但细节决定成败。我们必须确保我们不会错过隐藏在错综复杂的业务功能中的重要信息。

Let’s go back to the example of the customer service department. If we investigate its inner workings, we will see that a typical customer service department is composed of finer-grained components, such as a help desk system, shift management and scheduling, telephone system, and so on. When viewed as individual subdomains, these activities can be of different types: while help desk and telephone systems are generic subdomains, shift management is a supporting one, while a company may develop its ingenious algorithm for routing incidents to agents having success with similar cases in the past. The routing algorithm requires analyzing incoming cases and identifying similarities in past experience—both of which are nontrivial tasks. Since the routing algorithm allows the company to provide a better customer experience than its competitors, the routing algorithm is a core subdomain. This example is demonstrated in Figure 1-2.

让我们回到客户服务部门的例子。如果我们研究它的内部运作,我们会发现一个典型的客户服务部门由更细粒度的组件组成,如帮助台系统、班次管理和调度、电话系统等。当把这些活动视为单独的子域时,它们可能属于不同的类型:虽然帮助台和电话系统是通用子域,但班次管理是支撑子域,而公司可能会开发其独特的算法,将事件发送给过去成功处理过类似案例的客服。路由算法需要分析传入的案例并在过去的经验中识别相似性——这两项都是非常重要的任务。由于路由算法使公司能够比竞争对手提供更好的客户体验,因此路由算法是一个核心子域。这个例子在图1-2中进行了说明。

 

Figure 1-2. Analyzing the inner workings of a suspectedly generic subdomain to find the finer-grained core subdomain, supporting subdomain, and two generic subdomains

图1-2。分析疑似通用子域的内部运作,找到细粒度的核心子域,支撑子域和两个通用子域。

On the other hand, we cannot drill down indefinitely, looking for insights at lower and lower levels of granularity. When should you stop?

另一方面,我们不能无限期地深入研究,在越来越低的粒度级别上寻找答案。你应该什么时候停止?

Subdomains as coherent use cases

作为连贯用例的子域

From a technical perspective, subdomains resemble sets of interrelated, coherent use cases. Such sets of use cases usually involve the same actor, the business entities, and they all manipulate a closely related set of data.

从技术角度来看,子域类似于一组相互关联、连贯的用例。这样的用例集通常涉及相同的参与者、业务实体,并且它们都操作一组密切相关的数据。

Consider the use case diagram for a credit card payment gateway shown in Figure 1-3. The use cases are tightly bound by the data they are working with and the involved actors. Hence, all of the use cases form the credit card payment subdomain.

思考一下图1-3所示的信用卡支付网关的使用用例图。用例被它们所处理的数据和相关的参与者紧密地绑定。因此,所有的用例组成了信用卡支付子域。

We can use the definition of “subdomains as a set of coherent use cases” as a guiding principle for when to stop looking for finer-grained subdomains. These are the most precise boundaries of the subdomains.

我们可以将“子领域作为一组连贯的用例”的定义作为指导原则,以确定何时停止寻找更细粒度的子域。这些是最精确的子域边界。

 

Figure 1-3. Use case diagram of a credit card payment subdomain

图1-3 一个信用卡支付子域的用例图

Should you always strive to identify such laser-focused subdomain boundaries? It is definitely necessary for core subdomains. Core subdomains are the most important, volatile, and complex. It’s essential that we distill them as much as possible since that will allow us to extract all generic and supporting functionalities and invest the effort on a much more focused functionality.

你是否应该总是努力识别这样精确的子域边界?对于核心子域来说,这绝对是必要的。核心子域是最重要的、变化最快的、最复杂的。我们必须尽可能地提炼它们,因为这将使我们能够提取所有通用和支撑功能,并将精力集中在更加焦点(关键)的功能上。

The distillation can be somewhat relaxed for supporting and generic subdomains. If drilling down further doesn’t unveil any new insights that can help you make software design decisions, it can be a good place to stop. This can happen, for example, when all of the finergrained subdomains are of the same type as the original subdomain

对于支撑子域和通用子域,提炼过程可以稍微不那么严格。如果进一步深入研究并不能揭示任何新的见解来帮助您做出软件设计决策,那么这可能是一个停下来的好地方。例如,当所有的细粒度子域与原始子域属于同一类型时,就会发生这种情况。

Consider the example in Figure 1-4. Further distillation of the help desk system subdomain is less useful, as it doesn’t reveal any strategic information, and a coarse-grained, off-the-shelf tool will be used as the solution.

思考图1-4中的例子。对帮助台系统子域的进一步提炼没有多大用处,因为它不揭示任何战略信息,而且将使用粗粒度的现成工具作为解决方案。

Figure 1-4. Distilling the help desk system subdomain, revealing generic inner components

图1-4。提取帮助台系统子域,揭示通用的内部组件

Another important question to consider when identifying the subdomains is whether we need all of them.

在识别子域时需要考虑的另一个重要问题是我们是否真的需要所有子域。

Focus on the essentials

专注于本质

Subdomains are a tool that alleviates the process of making software design decisions. All organizations likely have quite a few business functionalities that drive their competitive advantage but have nothing to do with software. The jewelry maker we discussed earlier in this chapter is but one example.

子域是帮助做出软件设计决策的工具。所有组织可能都有很多推动其竞争优势的业务功能,但这些功能与软件无关。本章前面讨论的珠宝制造商就是一个例子。

When looking for subdomains, it’s important to identify business functions that are not related to software, acknowledge them as such, and focus on aspects of the business that are relevant to the software system you are working on.

在寻找子域时,识别与软件无关的业务功能,承认他们的存在,并关注与您正在开发的软件系统相关的业务方面,这一点很重要。

Domain Analysis Examples

领域分析示例

Let’s see how we can apply the notion of subdomains in practice and use it for making a number of strategic design decisions. I’m going to describe two fictitious companies: Gigmaster and BusVNext. As an exercise, while you are reading, analyze the companies’ business domains. Try to identify the three types of subdomains for each company. Remember that, as in real life, some of the business requirements are implicit.

让我们看看我们如何在实践中应用子域的概念,并使用它来做出一些战略设计决策。我将描述两个虚构的公司: Gigmaster 和 BusVNext。作为练习,当你阅读的时候,分析公司的业务领域。尝试为每个公司识别三种类型的子域。记住,就像在现实生活中一样,一些业务需求是隐性的。

Disclaimer: of course, we cannot identify all the subdomains involved in each business domain by reading such a short description. That said, it is enough to train you to identify and categorize the available subdomains.

免责声明:当然,通过阅读如此简短的描述,我们无法识别每个业务领域涉及的所有子域。但是,这足以训练你识别和分类现有的子域。

Gigmaster

Gigmaster is a ticket sales and distribution company. Its mobile app analyzes users’ music libraries, streaming service accounts, and social media profiles to identify nearby shows that its users would be interested in attending.

Gigmaster是一家票务销售和分销公司。其移动应用会分析用户的音乐库、流媒体服务账户和社交媒体个人资料,以识别用户可能感兴趣的附近演出。

Gigmaster’s users are conscious of their privacy. Hence, all users’ personal information is encrypted. Moreover, to ensure that users’ guilty pleasures won’t leak out under any circumstances, the company’s recommendation algorithm works exclusively on anonymized data.

Gigmaster的用户非常注重隐私。因此,所有用户的个人信息都是加密的。此外,为了确保用户的秘密喜好在任何情况下都不会泄露,该公司的推荐算法仅基于匿名数据进行工作。

To improve the app’s recommendations, a new module was implemented. It allows users to log gigs they attended in the past, even if the tickets weren’t purchased through Gigmaster.

为了提高应用的推荐功能,实现了一个新的模块。该模块允许用户记录他们过去参加过的演出,即使这些门票不是通过Gigmaster购买的。

Business domain and subdomains

业务领域及子域

Gigmaster’s business domain is ticket sales. That’s the service it provides to its customers.

Gigmaster的业务领域是票务销售。这是它向客户提供的服务。

Core subdomains

核心子域

Gigmaster’s main competitive advantage is its recommendation engine. The company also takes its users’ privacy seriously and works only on anonymized data. Finally, although not mentioned explicitly, we can infer that the mobile app’s user experience is crucial as well. As such, Gigmaster’s core subdomains are:

Gigmaster的主要竞争优势是其推荐引擎。该公司还非常重视用户的隐私,并且仅基于匿名数据进行工作。最后,虽然没有明确提及,但我们可以推断出移动应用的用户体验也同样重要。因此,Gigmaster的核心子域是:

  • Recommendation engine  推荐引擎
  • Data anonymization  数据匿名化
  • Mobile app  手机应用

Generic subdomains

通用子域

We can identify and infer the following generic subdomains:

我们可以识别和推断出以下通用子域:

  • Encryption, for encrypting all data  加密,用于加密所有数据
  • Accounting, since the company is in the sales business  会计,因为公司从事销售业务
  • Clearing, for charging its customers  结算,向客户收费
  • Authentication and authorization, for identifying its users  身份验证和授权,识别用户

Supporting subdomains

支撑子域

Finally, the following are the supporting subdomains. Here the business logic is simple and resembles ETL processes or CRUD interfaces:

最后,以下是支撑子域。这里的业务逻辑很简单,类似于 ETL 过程或 CRUD 接口:

  • Integration with music streaming services  与音乐流媒体服务的集成
  • Integration with social networks  与社交网络的集成
  • Attended-gigs module  参加演出模块

Design decisions

设计决策

Knowing the subdomains at play and the differences between their types, we can already make several strategic design decisions:

了解了正在运行的子域以及它们类型之间的差异后,我们就可以做出一些战略设计决策:

  • The recommendation engine, data anonymization, and mobile app have to be implemented in-house using the most advanced engineering tools and techniques. These modules are going to change the most often.  推荐引擎、数据匿名化和移动应用程序必须在公司内部使用最先进的工程工具和技术来实现。这些模块将经常发生变化。
  • Off-the-shelf or open source solutions should be used for data encryption, accounting, clearing, and authentication.  应该使用现成的或开源的解决方案来进行数据加密、会计、清算和身份验证。
  • Integration with streaming services and social networks, as well as the module for attended gigs, can be outsourced. 与流媒体服务和社交网络的集成,以及用于现场演出的模块,都可以外包。

BusVNext

BusVNext is a public transportation company. It aims to provide its customers with bus rides that are comfortable, like catching a cab. The company manages fleets of buses in major cities.

BusVNext 是一家公共交通公司。其目标是为乘客提供舒适如打的般的巴士服务。该公司在各大城市管理巴士车队。

A BusVNext customer can order a ride through the mobile app. At the scheduled departure time, a nearby bus’s route will be adjusted on the fly to pick up the customer at the specified departure time.

usVNext客户可以通过移动应用预订乘车服务。在预定的出发时间,附近公交车的路线将进行实时调整,以便在指定的出发时间接载客户。

The company’s major challenge was implementing the routing algorithm. Its requirements are a variant of the “travelling salesman problem”. The routing logic is continuously adjusted and optimized. For example, statistics show the primary reason for canceled rides is the long wait time for a bus to arrive. So, the company adjusted the routing algorithm to prioritize fast pickups, even if that means delayed drop-offs. To optimize the routing even more, BusVNext integrates with third-party providers for traffic conditions and real-time alerts.

该公司面临的主要挑战是实现路由算法。该算法的要求是“旅行商问题”的一种变体。路由逻辑被不断调整和优化。例如,统计数据显示,取消乘车的主要原因是要等待很长时间才能等来巴士。因此,该公司调整了路由算法,优先考虑快速接客,即使这意味着延迟放客人下车。为了进一步优化路由,BusVNext与第三方提供商合作,获取交通状况和实时警报。

From time to time, BusVNext issues special discounts, both to attract new customers and to level the demand for rides over peak and off-peak hours.

BusVNext 不时地发放特别折扣,以吸引新客户,并平衡高峰和非高峰时段的乘车需求。

Business domain and subdomains

业务领域和子域

BusVNext provides optimized bus rides to its customers. The business domain is public transportation.

BusVNext 为其客户提供优化的巴士服务。其业务领域是公共交通。

Core subdomains

核心子域

BusVNext’s primary competitive advantage is its routing algorithm that takes a stab at solving a complex problem (“travelling salesman”) while prioritizing different business goals: for example, decreasing pickup times, even if it will increase overall ride lengths.

BusVNext 的主要竞争优势在于其路由算法,该算法试图解决一个复杂的问题(“旅行商问题”),同时按重要性对不同的业务目标进行排序:例如,减少接客时间,即使它会增加整个乘车时长。

We also saw that the rides data is continuously analyzed for new insights into customers’ behaviors. These insights allow the company to increase its profits by optimizing the routing algorithm. Finally, BusVNext’s applications for its customers and its drivers have to be easy to use and provide a convenient user interface.

我们还看到,为获取客户行为的新见解,不断地地分析乘坐数据。这些见解使公司能够通过优化路由算法来增加利润。最后,BusVNext 为其客户和司机提供的应用程序必须易于使用,并提供方便的用户界面。

Managing a fleet is not trivial. Buses may experience technical issues or require maintenance. Ignoring these may result in financial losses and a reduced level of service.

管理车队并非易事。巴士可能会遇到技术问题或需要维修。忽视这些问题可能会导致经济损失和服务水平下降。

Hence, BusVNext’s core subdomains are:

因此,BusVNext 的核心子域是:

  • Routing  路由
  • Analysis  分析
  • Mobile app user experience  移动应用用户体验
  • Fleet management  车队管理

Generic subdomains

通用子域

The routing algorithm also uses traffic data and alerts provided by third-party companies—a generic subdomain. Moreover, BusVNext accepts payments from its customers, so it has to implement accounting and clearing functionalities. BusVNext’s generic subdomains are:

该路由算法还使用第三方公司提供的交通数据和警报——这是一个通用子域。此外,BusVNext 接受客户的付款,因此它必须实现会计和结算功能:BusVNext 的通用子域包括:

  • Traffic conditions  交通状况
  • Accounting  会计
  • Billing  帐单
  • Authorization  授权

Supporting subdomains

支撑子域

The module for managing promos and discounts supports the company’s core business. That said, it’s not a core subdomain by itself. Its management interface resembles a simple CRUD interface for managing active coupon codes. Therefore, this is a typical supporting subdomain.

管理促销和折扣的模块支持公司的核心业务。但话说回来,它本身并不是一个核心子域。它的管理接口类似于管理活动优惠券代码的简单 CRUD 接口。因此,这是一个典型的支撑子域。

Design decisions

设计决策

Knowing the subdomains at play and the differences between their types, we can already make a number of strategic design decisions:

了解了正在运行的子域以及它们类型之间的差异后,我们就可以做出一些战略设计决策:

  • The routing algorithm, data analysis, fleet management, and app usability have to be implemented in-house using the most elaborate technical tools and patterns.  必须使用最精细的技术工具和模式在公司内部实现路由算法、数据分析、车队管理和应用可用性。
  • Implementation of the promotions management module can be outsourced.  促销管理模块的实现可以外包。
  • Identifying traffic conditions, authorizing users, and managing financial records and transactions can be offloaded to external service providers. 识别交通状况、授权用户以及管理财务记录和交易都可以交由外部服务提供商来处理。

Who Are the Domain Experts?

谁是领域专家?

Now that we have a clear understanding of business domains and subdomains, let’s take a look at another DDD term that we will use often in the following chapters: domain experts. Domain experts are subject matter experts who know all the intricacies of the business that we are going to model and implement in code. In other words, domain experts are knowledge authorities in the software’s business domain.

既然我们已经对业务领域和子域有了清晰的理解,那么让我们来看看另一个 DDD 术语,我们将在后续章节中经常使用它: 领域专家。领域专家是专题专家,他们了解我们即将建模并在代码中实现的业务的所有复杂性。换句话说,领域专家是软件业务领域的知识权威。

The domain experts are neither the analysts gathering the requirements nor the engineers designing the system. Domain experts represent the business. They are the people who identified the business problem in the first place and from whom all business knowledge originates. Systems analysts and engineers are transforming their mental models of the business domain into software requirements and source code.

领域专家既不是收集需求的分析师,也不是设计系统的工程师。领域专家代表业务。他们首先是识别业务问题的人,并且所有业务知识都来源于他们。由系统分析师和工程师将业务领域的思维模型转化为软件需求和源代码。

As a rule of thumb, domain experts are either the people coming up with requirements or the software’s end users. The software is supposed to solve their problems.

通常来说,领域专家是提出需求的人或软件的最终用户。该软件旨在解决他们的问题。

The domain experts’ expertise can have different scopes. Some subject matter experts will have a detailed understanding of how the entire business domain operates, while others will specialize in particular subdomains. For example, in an online advertising agency, the domain experts would be campaign managers, media buyers, analysts, and other business stakeholders.

领域专家的专业知识可以有不同的范围。一些专题专家将对整个业务领域如何运作有详细的了解,而另一些专家则会在特定的子领域上有所专长。例如,在在线广告公司中,领域专家可能是广告活动经理、媒体买家、分析师和其他业务利益相关者。

Conclusion

结尾

In this chapter, we covered domain-driven design tools for making sense of a company’s business activity. As you’ve seen, it all starts with the business domain: the area the business operates in and the service it provides to its clients.

在本章中,我们介绍了理解公司业务活动的领域驱动设计工具。正如您所见,所有一切都始于业务域:公司所在的经营领域以及为客户提供的服务。

You also learned about the different building blocks required to achieve success in a business domain and differentiate the company from its competitors:

您还了解了在业务领域取得成功所需的不同组成部分,以及如何将公司有别于竞争对手:

Core subdomains

核心子域

The interesting problems. These are the activities the company is performing differently from its competitors and from which it gains its competitive advantage.

有趣的问题。这是公司与竞争对手不同并且从中获得竞争优势的活动。

Generic subdomains

通用子域

The solved problems. These are the things all companies are doing in the same way. There is no room or need for innovation here; rather than creating in-house implementations, it’s more cost-effective to use existing solutions.

已解决的问题。这是所有公司都在以相同方式做的事情。这里没有创新的空间或需要;与其创建内部实现,不如使用现有解决方案更具成本效益。

Supporting subdomains

支撑子域

The problems with obvious solutions. These are the activities the company likely has to implement in-house, but that do not provide any competitive advantage.

显而易见的解决方案的问题。这些是公司可能需要在内部实施的活动,但它们不提供任何竞争优势。

Finally, you learned that domain experts are the business’s subject matter experts. They have in-depth knowledge of the company’s business domain or one or more of its subdomains and are critical to a project’s success.

最后,您了解到领域专家是业务的专题专家。他们对公司的业务领域或一个或多个子领域有深入的了解,对项目的成功至关重要。

Exercises

练习

1. Which of the subdomains provide(s) no competitive advantage?  哪些子域没有提供竞争优势?

a. Core  核心子域

b. Generic  通用子域

c. Supporting  支撑子域

d. B and C  通用子域和支撑子域

答案:d。Only core subdomains provide competitive advantages that differentiate the company from other players in its industry.    只有核心子域提供区别于其行业内其他参与者的竞争优势。

2. For which subdomain might all competitors use the same solutions?  对于哪个子域,所有竞争对手可能使用相同的解决方案?

a. Core.  核心子域

b. Generic.  通用子域

c. Supporting.  支撑子域

d. None of the above. The company should always differentiate itself from its competitors.  以上都不是。公司应该始终有别于其竞争对手

答案:b。Generic subdomains are complex but do not entail any competitive advantage. Hence, it’s preferable to use an existing, battle-proven solution.    通用子域是复杂的,但并不具有任何竞争优势。因此,最好使用现有的,经过实战验证的解决方案。

3. Which subdomain is expected to change the most often?  预计哪个子域最经常更改?

a. Core.  核心子域

b. Generic.  通用子域

c. Supporting.  支撑子域

d. There is no difference in volatility of the different subdomain types.  不同子域类型的波动性没有差异。

答案:a。Core subdomains are expected to be the most volatile since these are areas in which the company aims to provide new solutions and it often requires quite a few interactions to find the most optimized solution.    预期核心子域是最不稳定的,因为这些领域的公司旨在提供新的解决方案,它往往需要相当多的交互,以找到最优化的解决方案。

Consider the description of WolfDesk (see the Preface), a company that provides a help desk ticket management system:  思考一下 WolfDesk 的描述(参见前言),这是一家提供帮助台工单管理系统的公司:

4. What is WolfDesk’s business domain?  WolfDesk的业务领域是什么?

答案:WolfDesk’s business domain is Help Desk management systems.    WolfDesk 的业务领域是服务台管理系统。

5. What is/are WolfDesk’s core subdomain(s)?  WolfDesk的核心子域有哪些?

答案:

We can identify the following core subdomains that allow WolfDesk to differentiate itself from its competitors and support its business model:

我们可以识别以下核心子域,使WolfDesk能够与其竞争对手区分开来,并支持其业务模式:

a. Ticket lifecycle management algorithm that is intended to close tickets and thus encourage users to open new ones    工单生命周期管理算法,旨在关闭工单,从而鼓励用户开放新的工单

b. Fraud detection system to prevent abuse of its business model    防止其商业模式被滥用的欺诈检测系统

c. Support autopilot that both eases the tenants’ support agents’ work and further reduces the tickets’ lifespan    自动辅助支持既方便了租户的支持客服的工作,又进一步缩短了工单的生命周期

6. What is/are WolfDesk’s supporting subdomain(s)?  WolfDesk的支撑子域有哪些?

答案:

The following supporting subdomains can be identified in the description of the company:

公司的描述中可以确定以下支撑子域:

a. Management of a tenant’s ticket categories    管理租户的工单种类

b. Management of a tenant’s products, regarding which the customers can open support tickets    管理租户的产品,对此客户可以打开支持工单

c. Entry of a tenant’s support agents’ work schedules    输入租户的支持客服的工作时间表

7. What is/are WolfDesk’s generic subdomain(s)?  WolfDesk的通用子域有哪些?

答案:

The following generic subdomains can be identified in the description of the company:

在公司的描述中可以确定下列通用子域:

a. “Industry standard” ways of authenticating and authorizing users    认证和授权用户的“行业标准”方式

b. Using external providers for authentication and authorization (SSO)    使用外部提供程序进行身份验证和授权(SSO)

c. The serverless compute infrastructure the company leverages to ensure elastic scalability and minimize the compute costs of onboarding new tenants    该公司利用无服务计算基础设施来确保弹性可伸缩性,并最小化登录新租户的计算成本 

posted @ 2022-11-19 10:32  菜鸟吊思  阅读(127)  评论(0)    收藏  举报