开发者

are hibernate applications domain driven?

开发者 https://www.devze.com 2023-01-13 07:32 出处:网络
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开发者_StackOverflow社区 ther

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开发者_StackOverflow社区 there also be a Domain Layer wherein all the hibernate entities exist?

I'm looking my application somehting like this:

are hibernate applications domain driven?

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.


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

  • The official Domain-Driven Design Community website
  • The Domain-Driven Design yahoo group
  • Domain-Driven Design Quickly (great summary book of Eric Evans's reference book).

  • Chris Richardson's aop-ood sample application

See also

  • Still confused about repositories


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号