Announcement Announcement Module
No announcement yet.
Religious Question: Does Spring favor Anemic Domain Model? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Religious Question: Does Spring favor Anemic Domain Model?

    Folks- There is an article "Green Beans: Getting Started with Spring in your Service Tier" at:

    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.

  • #2
    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).