Results 1 to 2 of 2

Thread: Religious Question: Does Spring favor Anemic Domain Model?

  1. #1
    Join Date
    Aug 2010
    Posts
    26

    Question 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=1.38.10.1300540180&__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.

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    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).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •