Mar 19th, 2011, 08:48 AM
Religious Question: Does Spring favor Anemic Domain Model?
Folks- There is an article "Green Beans: Getting Started with Spring in your Service Tier" at:
http://blog.springsource.com/2011/01/07/green-beans-getting-started-with-spring-in-your-service-tier/?__utma=1.1519770679.1300447990.1300447990.1300447 990.1&__utmb=188.8.131.520540180&__utmc=1&__utmx=-&__utmz=1.1300541090.1.2.utmcsr=google|utmccn=%28o rganic%29|utmcmd=organic|utmctr=springsource&__utm v=-&__utmk=140574386
Following are excerpts:
The term "domain model" describes the nouns, or data, in a system that is important to the problem you're trying to solve. The service tier – where business logic lives – manipulates the application data and must ultimately persist it (typically, in a database).
Nouns and Verbs:
The service tier describes the verbs (actions) in a system. The domain model describes the nouns (data).
My Question is: Is Domain-Driven design not natural to Spring? (not unlike EJB model) The above mentioned article reeks of anemic domain model.
I'm new to Spring and was hoping it would allow for rich POJO based domain objects carrying out the business logic (of course falling back on a thin service layer when needed, I'm not an OO Nazi ) and relying on the container for services best taken care of elsewhere (tx, security, etc).
My question is not about the merits (or demerits) of DDD, rather what is the paradigm (DDD or service/anemic based) an experienced Spring designer follows? (and why).
I'll really appreciate the responses, this is not just a philosophical question, my team is at the verge of a new project and nobody wants to use EJB, we thought Spring inherently supports the "right" kind of OO.
If I'm guilty of not searching the forums for this type of question, I'm truly sorry.
Mar 27th, 2011, 03:00 PM
For starters use the search...
An answer isn't easy because you can do both or a mix... It doesn't really matter, you can use spring in the way you want (Spring ROO actually uses a rich domain model).
Tags for this Thread