You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In their implementations, DDD building blocks have a well defined mapping towards who is managing the lifecycle of them. Two concepts can be found:
Newables – concepts manually instantiated in domain code either via constructors or factory methods. Building blocks that fall into that category: value objects, entities, aggregates.
Injectables – concepts instantiated and assembled in a canonical place (either by hand crafted code or some kind of container managing the object lifecycle). Those are usually wired into through the concept of dependency injection (hence the name). Building blocks to mention here: factory, repository, service.
The annotations here would be defined as meta-annotations (i.e. @Target(ElementType.ANNOTATION_TYPE)) only as they're used to qualify meta elements for either references. A downstream use case would be for tools to easily identify the different groups of concepts so that they can define general rules enforced on those without having to know about which of the actual meta elements belong to that group. A very fundamental rule example would be that newables must not depend on injectables but only the other way round.
The text was updated successfully, but these errors were encountered:
In their implementations, DDD building blocks have a well defined mapping towards who is managing the lifecycle of them. Two concepts can be found:
The annotations here would be defined as meta-annotations (i.e.
@Target(ElementType.ANNOTATION_TYPE)
) only as they're used to qualify meta elements for either references. A downstream use case would be for tools to easily identify the different groups of concepts so that they can define general rules enforced on those without having to know about which of the actual meta elements belong to that group. A very fundamental rule example would be that newables must not depend on injectables but only the other way round.The text was updated successfully, but these errors were encountered: