
Thursday, March 24, 2005
Should the code in an object span multiple tiers? For example, should the object encapsulate the data persistence, the business logic and user interface layers?
Or should there be multiple objects to represent the object in each tier?
From Holub on Patterns:
The prime directive of OO systems is as follows:
Never ask an object for information that you need to
do something; rather, ask the object that has the information to
do the work for
you.
Ken Arnold says, "Ask for help, not for information."
-
Objects are defined by "contract." They don't violate their contract.
-
All data is private. Period. (This rule applies to all implementation details, not just the data.)
-
It must be possible to make any change to the way
an object is implemented, no matter how significant that change, by
modifying the single class that defines that object.
-
"Get" and "set" functions are evil when used
blindly (when they're just elaborate ways to make the data public).
I've a lot more to say on this issue later in the "Getters and Setters
Are Evil" section.

Wednesday, March 23, 2005
Welcome to the newly created blog section of Pragmatic Labs. This is mostly for the journal of Pragmatic Labs chief engineer; Chris Weber. This is my thought workspace, a place to list links, research and follow up items.
© Copyright 2008 Chris Weber
Theme design by
Bryan Bell
newtelligence dasBlog 1.9.6264.0

| Page rendered at Thursday, August 28, 2008 8:51:30 PM (Central Standard Time, UTC-06:00)