candy-doc-maven-plugin icon indicating copy to clipboard operation
candy-doc-maven-plugin copied to clipboard

Specify type of bounded context

Open ctacquet opened this issue 2 years ago • 1 comments

Description

Is your feature request related to a problem? Please describe. Currently, we can annotate bounded context but according to DDD Distilled we can distinguish 3 primary types of subdomains :

  • Core domain : when bounded context is being developed as a key strategic initiative of the organization
  • Supporting subdomain : When your model can not be represented universally but you still want to do functions related to what the business does.
  • Generic subdomain : Parts of the system that are not core to the business but facilitate it.

Describe the solution you'd like I'd like to add annotate bounded context like this :

@CoreDomain
@BoundedContext
public class BoundedContextExample {
}

Describe alternatives you've considered We also could had an attribute to bounded context annotation :

@BoundedContext(name = "xxx", description = "xxx", type = SubdomainType.CoreDomain)
public class BoundedContextExample {
}

Additional context A bounded context can only be annotated by one type of subdomain.

ctacquet avatar Jun 01 '22 08:06 ctacquet

I think that adding an attribute to our bounded context is a better solution because it doesn't confuse users. By default all bounded contexts could be generic subdomain. It will ensure that user will not annotate something that shouldn't be annotated with these 3 annotations.

ctacquet avatar Jun 01 '22 08:06 ctacquet