RE: Separation of Objects from Logic 2004-12-11 - By Philip Nelson
> Disadvantages > > a) The methods are always there even when they're not used. > b) ... erm ?
How would that be different if the methods were in another class? There is a perception that there is some downside to having methods on a class in terms of memory or something, but for the record, that is not true. Then there is just the general clutter of having lots of method calls on an object. That can be true and the points made about encapsulation have been made already. > > 2. Where each object is just a class with properties, light weight, but > completely dumb. All logic is performed through a separate Business Logic > Layer.
This looks like Fowler's Data Transfer Objects where you pass around DTO's to a variety of Manger type classes (your Business layer perhaps). Here is a pointer to a long of discusion on that topic by someone you may agree with more than I did in that case ;-)
http://www.matshelander.com/Weblog/DisplayLogEntry.aspx?LogEntryID=47
===== Philip - http://blogs.xcskiwinn.org/panmanphil "There's a difference between righteous anger and just being crabby" - Barbara
Need SQL Advice? http://sqladvice.com Need RegEx Advice? http://regexadvice.com Need XML Advice? http://xmladvice.com
|
|