views:

66

answers:

2

If I'm developing a hiberante application, am I also developing a DD model?

My application does have a service layer ( which is in lines with the Observer pattern). Will there also be a Domain Layer wherein all the hibernate entities exist?

I'm looking my application somehting like this:

alt text

Do I need to know Domain Driven Design to write Hibernate Entities?

Can the application be hybrid - OOD in the service layer and DDD in the persistence layer?

I'm confused. Please clarify.

+2  A: 

actually DDD is an approach and is not tied to the tools that you are using.

you can use Hibernate or any other OR mappers to do DDD or any other aspects that you thins is suitable for your case.

read more about DDD: http://en.wikipedia.org/wiki/Domain-driven_design

mohammad shamsi
+5  A: 

If I'm developing an Hibernate application, am I also developing a DD model?

When using Hibernate, you'll probably create a domain model of entities and do some domain modeling but you aren't necessarily following Domain-Driven Design principles, there is no direct implication. And actually, I'm tempted to say that it's most often the contrary, most Hibernate applications end up having an anemic domain model.

Do I need to know Domain Driven Design to write Hibernate Entities?

No. there is no particular knowledge to have to write Entities. However, if you want to follow DDD, you obviously need to have some knowledge of DDD. And if you want to go this direction, using Hibernate (as your factory for entities) has some implications on the implementation. Domain-Driven Design with Spring and Hibernate is a very nice blog post on the topic and describes an AOP based approach.

Resources

See also

Pascal Thivent