Stay with the 'classic' approach.

I've been on a couple of projects now where they avoided this approach
(fuelled by having read Eric Evans book) and caused no end of
problems. In the end, it was refactored to something resembling the
layered approach anyway.

This anemic domain model anti-pattern is blown out of all proportion.
Its a 'style' thing more than anything else as far as i can see. Most
apps are essentially a web-front end to a database anyway and can be
built quite successfully with an anemic domain model.

Its all about judgement. Domain objects for example contain business
logic but this logic should only works against the attributes of the
domain object.

Passing in services to the domain object is a step too far - the class
needs loads more tests and violates Single Responsibility Principle
(which after DRY, is the second most important principle).

So, stick with the classic approach until something better comes along
- and sorry, but Eric Evans book is not it. Its a set of analysis
ideas rather than implementation principles and even then he says use
it for the most complex parts of your app.

No project failed because it used the layered approach. It failed
because of inexperienced devs, poor requirements, impossible
deadlines, etc.

R

On Wed, Jul 29, 2009 at 12:34 PM, Mwanji Ezana<[email protected]> wrote:
>
> On Jul 29, 12:40 pm, Michael Neale <[email protected]> wrote:
>> No you are not - you are unfortunately perfectly sane and right to
>> question this crazyness. I say unfortunately as you probably have
>> overenthusastic colleagues that will drive your project into the
>> weeds.
>
> Well, I'm really happy that today we came to a reasonable compromise.
> A better world is possible! :)
>
> Moandji
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to