Question

I have used an MDA (model driven architecture) tool in the past where we modeled via UML and this generated the business entities (our domain model) and the ORM (mapping etc) amongst other things.

A lot of the business code and services working on the domain were part of the model and our repositories were returning the business entities (so it would have been impossible to switch out to another ORM (not that we wanted to)).

However, now I am starting a project and I want to think in terms of DDD.

So far it feels as though I put my business logic in my domain model and via repositories I would work with the ORM (which ever I chose). However, if I wanted to continue to use the MDA tool for the ORM part of the application, the model created here would be very anemic (i.e not contain any business logic). Similarly if I used Entity framework (.net) or NHibernate for my ORM it too would be an anemic model.? I am not sure where you would put the business logic if I just used NHibernate.

Am I correct in thinking this way, in other words with DDD all the business logic in the domain and just use the ORM for persistence via repositories?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top