Re: How it all fits together
2008-06-01 05:25:30 GMT
In a way defining annotations on your entities bring persistence awareness to your DDD entities. However it still does not assume responsibility for the actual persistence. The actual persistence would still be handled outside the domain layer. So no pollution of domain entities happen imho.
Practically, I actually like having annotations in code compared to an external hbm file since i can see/understand the persistence structure when looking at code. This is quite handy when looking at new code and trying to figure out the behaviour.
> 3. Is the service layer a part of the domain layer?
If you mean service la yer then they are not part of domain. But if you mean services themselves the domain layer can have services within them. I have blogged about domain services recently and have covered this question where i have pointed to a few links where this has been discussed in great detail. Have a look.
Thanks,
Kaushik
http://stochastyk.blogspot.com/
--- In domaindrivendesign <at> yahoogroups.com, "dover.roni" <roni.dover <at> ...> wrote:
>
>
> I have been reading about DDD but seem to be having problems
> understanding how it falls into place with other concepts I'm familiar
> with. For examp le:
>
> 1. DAO objects (CRUD), should they be a part of the domain model for
> each entity? How do they fit in with the big picture here?
>
> 2. I'm using hibernate and have mapped my domain classes using
> annotations, is that bad form because it brings persistence logic into
> the domain layer? Is the domain layer supposed to define persistence
> in the structure of its entities according to DDD design as demanded
> by hibernate?
>
> 3. Is the service layer a part of the domain layer?
>
> Thanks in advance,
>
> Roni
>
__._,_.___
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
It seemed like a good idea at the time, but now it more seems like a
workaround for bad design patterns... oh well..
Anyway, it seems to me that this lack of a unified way to do metadata,
and to consider the different phases (development, packaging,
deployment, production, etc.), is something that is forcing us to do all
sorts of workarounds, including annotations. There's gotta be a better way.
/Rickard
------------------------------------
RSS Feed