Martin Fowler has spotted a worrying trend in domain model design - anemia! That's his term for domain models that have no logic in them - where all of the logic has migrated to the service layer. His point is that the service layer should be fairly thin and the business logic belongs in the domain model itself.
This will be of particular interest to Mach II developers because, whilst the framework mitigates against putting too much logic in the controller portion (the XML file), you can still bulk up your listeners as a service layer and end up with too much business logic in your listeners - instead of down in the domain model where it really belongs.
If you read the Designing Models section of the Mach II Development Guide, you'll see that it recommends separating your business model (the domain model) from the Mach II framework so that your listeners don't end up full of business logic.
Martin Fowler on Domain Model Design
November 25, 2003 · 4 Comments
Tags: architecture · programming

4 responses so far ↓
1 Paul Kenney // Sep 8, 2004 at 5:04 PM
2 seancorfield // Sep 8, 2004 at 5:04 PM
3 Hal Helms // Sep 8, 2004 at 5:04 PM
4 Paul Kenney // Sep 8, 2004 at 5:04 PM
Leave a Comment