custom annotations

37 views
Skip to first unread message

Maciej Hadam

unread,
Sep 26, 2011, 3:08:39 PM9/26/11
to ddd-cqrs-sample
Hi everyone,

What are the plans about responsibilities of custom annotations that
already exists in the project (e.g. @DomainAggregateRoot,
@DomainEntity, ...).

Sławomir Sobótka

unread,
Sep 26, 2011, 3:23:30 PM9/26/11
to ddd-cqr...@googlegroups.com
Vision is to use them to tag code to be able to visualize hierarchical
and zoomable design of the model:
http://code.google.com/p/ddd-cqrs-sample/wiki/DomainDrivenDesignBusinessDeveloperMentalModel#Expressing_Design_using_Custom_Annotations
Visual tool should behave just like prezi:
http://prezi.com/hi2dmhfej9zu/ddd-cqrs-sample/
So we can see modules, than aggregates, and digging *inside*
aggregates we will see aggregates entities. All uml tools draws flat
picture that is hard to grasp when dealing with large models.

It would be also nice to "teach" hibernate that @DomainAggregateRoot,
@DomainEntity means @Entity in JPA world. So that we do not need to
add both @DomainEntity and @Entity annotations - it should be able to
add just @DomainEntity. Just like in Spring, we can create custom
annotations that are annotated with @Component and @Service. But I
guess that need to go into deep guts each JPA impl...


Sławek Sobótka

Reply all
Reply to author
Forward
0 new messages