The Artima Developer Community
Sponsored Link

Legacy Design Forum
Canonical Object Idiom

Advertisement

Advertisement

This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

What should be an "object" and Canonical Objects

Posted by John Lysaght on August 31, 2000 at 2:11 PM

I believe that canonical objects is a step in the right direction.
We also need to standardize the definition of an object. I propose
that an object should be defined in the realm of an item that has
physical mass, or could have physical mass or has certain other
properties such that it would naturally have actions or states
specific to its nature. By this I mean that a building is an object
while an address is an attribute that points to a specific instanace of
the object building and not an object in itself.
Consider: an address in real life is nothing more than a pointer to
a place or an object. While an address can be broken down into
individual parts (street, city, state etc) it does not perform any
actions of its own account. The mailman (an instance of an object)
delivers mail (another object) to the buiding (an object pointed to
by the address).
In summary, it would greatly simplify expectations if we established
a difference between physical objects of the real and imagined world
and the various attributes of those objects. Just because an attribute
has subparts does not imply that it should be defined as an object.
There is a time and a place for structures, arrays, tables and other
such constructs. Lets come up with some logical standards that allow
reusable code by knowing not only what methods a generic object might
already contain but also by knowing when an idea or attribute is not
an object. This will simplify the decision matrix required when attempting
to identify methods, states, and attributes of all objects.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us