Re: [LIP] MVC is not OO
Shantanu Kumar <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2004-03-04 at 22:34, Sandip Bhattacharya wrote: > [I found a really interesting article on building interfaces to OO > systems. The article is delightfully irreverent. :) - Sandip ] > > http://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox_p.html > > [...] > > I'll explain the whys and wherefors in a moment, but here are some rules > of thumb that you can apply to see if you're really looking at an > object-oriented system: > > 1. All data is private. Period. (This rule applies to all > implementation details, not just the data.) Absolutely agree!! But use of "mutable" (C++) should be encouraged to express the correct liability about change (by methods), what do you think? > 2. get and set functions are evil. (They're just elaborate ways to > make the data public.) All data is private and you don't want me to use get/set, then how do I implement associations using aggregation? Am confused at this really. > 3. Never ask an object for the information you need to do something; > rather, ask the object that has the information to do the work for you. > 4. It must be possible to make any change to the way an object is > implemented, no matter how significant that change may be, by modifying > the single class that defines that object. Neat. Points up till here will probably apply well to any OO design, not just UI. > 5. All objects must provide their own UI. > Thanks for the link. Nice read. Regards, Shantanu -- In a world without walls and fences, who needs windows and gates? ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click