I read about DDD and limited contexts, and I think I'm wrong. At first I liked the idea of ​​subdomains and limited contexts, I understood it this way: there is software that needs to be developed, but attacking everything at once is too much, so we break it into logical parts and develop it every time. Another problem we are solving is ambiguity in the ubiquitous language.
This made me think about limited contexts, because basically these are just folders in which I group and bind the code associated with a specific part of the application. This code, which I thought was made up of things like
- The domain model of this limited context, including abstractions for repositories and services
- The infrastructure level for this limited context, repository implementation, etc.
Of course, if the domain model and infrastructure are properly separated in a limited context.
Further, however, it seems that each limited context is a complete application at its discretion. It sometimes seems that each limited context has its own application layer, for example.
It confused me, because sometimes I don’t want to end up developing tons of applications, I’m the only one to develop it. The limited separation of application context was to create one application, and not many applications for integration.
I seem to have this question where @MikeSW claims that both approaches presented by OP are valid. I ask about the third structure:
<bc 1> |_ domain |_ infrastructure <bc 2> |_ domain |_ infrastructure |_ application |_ presentation
At least for all the applications that I think it makes sense. I want one application, not several applications with several presentations, but I still want to be able to split the domain and take advantage of such things as the “ubiquitous language restriction”.
So, limited context - full application? Or can I use a limited context, as I understand it, and feel more useful? Have problems with my approach?
domain-driven-design bounded-contexts
user1620696
source share