I've been following this discussion pretty intently, but haven't had much to add, since Sean covers it so well. One thing is below, however, that I don't recall was mentioned or not.

Jaime Metcher wrote, On 7/5/2007 5:32 PM:
My fixed mental model is "everything is an object".  I can write (and have
done so) object oriented code in Pascal, CF 4.0, perl and (yes, Tom), macro
assembler.  Where the language features aren't there to help out, they can
be simulated or worked around - but this is harder, more error prone and
usually slower than when they are.  It also means that I have to remember
how the workarounds work - the mental model is more complex and less
consistent.

So, in CF:
1. Classes aren't objects.  This can be worked around by creating a separate
CFC, an instance of which will act as the class object.  In CF it seems to
be common practice to put whole-of-class methods and data into service,
manager and gateway objects which therefore act in combination as a class
object.  Service objects I've seen often provide whole-of-class methods for
more than one class, as well as logic spanning classes.

I don't think static methods (or class methods) are especially object oriented. Certainly they /can/ be acceptable in your code, but they are more procedural in nature.

Someone correct me if I'm wrong.

Sam



You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to