官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 赞皇县| 桐乡市| 孙吴县| 平遥县| 大丰市| 濉溪县| 横峰县| 津市市| 徐闻县| 田阳县| 新田县| 溆浦县| 嵊州市| 龙岩市| 合肥市| 杭锦旗| 彭水| 凌源市| 巴彦淖尔市| 建始县| 卫辉市| 襄垣县| 城步| 田林县| 临西县| 南溪县| 宜黄县| 扎赉特旗| 竹北市| 增城市| 温泉县| 宜兰县| 定边县| 马鞍山市| 横山县| 桦南县| 枣阳市| 工布江达县| 砀山县| 恩施市| 通江县|