Should business services cross bounded contexts?

Firstly, I am following the convention that a bounded context is synonymous to a department, or possibly one department has 1 to many bounded contexts.

We have a client consultancy department that has a Documentation Service. Documents are stored in the Document Store Service (which is where all documents in the company are stored – it is a utility service), and the Documentation Service stores information about that document (a business service). As it was designed for the client consultancy, it is information relevant to them.

Now health and safety need somewhere to store information about a document. This is different information to client consultancy, but I have been instructed to extend the existing service to account for this extra information. I feel this service is now crossing a bounded context. My worry is that all departments will eventually store there information in here and the service will become bloated, trying to be all things to all departments. Each document record will only store a subset of the information because it will only belong to one department.

It will get worse when different departments want to store the same information but refer to it in a diferent ways, or when two departments want to store different information that they refer to in the same way. In my understanding, this is exactly the reason for bounded contexts.

I feel each department should have it’s own business service for information about a document, but use the same utility service to actually store the document.

What would be the correct approach?

You probably have just identified the need for a function that is not specific to any one department, but rather forms kind of a basic infrastructure. Consider forming a bounded context “Basic Infrastructure”, and assign the Documentation service there. This way, there are clear boundaries and dependencies between the different context. The basic Documentation service can still be consumed by any department, without messing up your design.

Consider specific implementations on top of the more generic Documentation service to deal with functions specific to a department (or rather: business function). Those specific implementations would then belong to the respective bounded context. E.g.

  • Basic Infrastructure: GenericDocumentationService(document, attributes) – where document is the document to be stored, attributes is a list of key/value paris
  • Client Consultancy: ConsultancyDocumentationService(document, client)
  • Health and Safety: HealthSafetyDocumentationService(document, risk, mitigation)

The client and health&safety implementations would e.g. validate and process their specific arguments, then use the generic service to finally store the document.

NB: In general, business organizational structure such as departments do not make for good boundaries. Rationale: organizational structures tend to change over time and such changes are likely to invalidate previously identified boundaries. Instead it is advisable to identify the core business functions and group those into logically cohesive blocks.

There is no reason why your document information service can’t be designed so that the pieces of information stored in it stay within their respective bounded contexts. In fact I imagine this would be a natural consequence of how you might plan to design the system, if it isn’t designed this way already.

If your system has logins or groups, and documents are kept in the login/group in which they are created, then this will achieve the above goal.

I am comparing your document information system to a company wiki. A wiki can be used by an entire >1000 employ organisation and it might contain pages that are terribly important to one person but complete gibberish to another, and yet everything’s okay because the respective business units generally have their own mostly discrete set of pages on the wiki that other business units ignore or aren’t even aware of.

Yes you may have to extend your application to cover a wider and more general audience, but this is the goal/nightmare of any real application. Think of any database system – its goal is to solve the data storage problems of everyone everywhere. It’s debatable how well they do it, but they can’t be failing because everybody is using them.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật