- Mastering Microservices with Java 9(Second Edition)
- Sourabh Sharma
- 309字
- 2021-07-02 21:54:51
Bounded context
When you have different submodels, it is difficult to maintain the code when all submodels are combined. You need to have a small model that can be assigned to a single team. You might need to collect the related elements and group them. Context keeps and maintains the meaning of the domain term defined for its respective submodel by applying this set of conditions.
These domain terms define the scope of the model that creates the boundaries of the context.
Bounded context seems very similar to the module that you learned about in the previous section. In fact, the module is part of the bounded context that defines the logical frame where a submodel takes place and is developed. Whereas, the module organizes the elements of the domain model, and is visible in the design document and the code.
Now, as a designer, you would have to keep each submodel well-defined and consistent. In this way, you can refactor each model independently without affecting the other submodels. This gives the software designer the flexibility to refine and improve it at any point in time.
Now, let's examine the table reservation example we've been using. When you started designing the system, you would have seen that the guest would visit the application, and would request a table reservation at a selected restaurant, date, and time. Then, there is the backend system that informs the restaurant about the booking information, and similarly, the restaurant would keep their system updated in regard to table bookings, given that tables can also be booked by the restaurant themselves. So, when you look at the system's finer points, you can see two domain models:
- The online table reservation system
- The offline restaurant management system
Both have their own bounded context and you need to make sure that the interface between them works fine.
- 一步一步學(xué)Spring Boot 2:微服務(wù)項(xiàng)目實(shí)戰(zhàn)
- Learn React with TypeScript 3
- Ext JS 4 Web Application Development Cookbook
- Java Web程序設(shè)計(jì)任務(wù)教程
- Visual Basic程序設(shè)計(jì)實(shí)踐教程
- jQuery Mobile移動(dòng)應(yīng)用開(kāi)發(fā)實(shí)戰(zhàn)(第3版)
- Solr Cookbook(Third Edition)
- 大話Java:程序設(shè)計(jì)從入門到精通
- 深度探索Go語(yǔ)言:對(duì)象模型與runtime的原理特性及應(yīng)用
- PHP與MySQL權(quán)威指南
- Unity 5.X從入門到精通
- Node.js實(shí)戰(zhàn):分布式系統(tǒng)中的后端服務(wù)開(kāi)發(fā)
- Keil Cx51 V7.0單片機(jī)高級(jí)語(yǔ)言編程與μVision2應(yīng)用實(shí)踐
- SCRATCH編程課:我的游戲我做主
- 精益軟件開(kāi)發(fā)管理之道