Matt Williams
unread,Jul 14, 2009, 11:47:53 AM7/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Object-Oriented Programming in ColdFusion
I think it would help to have an agreement on what it means to do OO,
particularly in ColdFusion. In the discussion, Ben says he uses CFCs
as singletons to handle things like Security and Emails. In response
to Brian's question, "How much OO do you do?", Ben could respond, "A
small amount." Or he could say, "None at all, but I do use some CFCs
to encapsulate functionality and put them into application scope for
reuse"?
Is an application not considered OO until the entire model is
abstracted, decoupled, encapsulated, and obfuscated? Or could simply
instantiating a user.cfc whenever a user logs in perhaps be considered
the beginnings of OO?
In the case that Ben, with his 5 or 6 CFCs, is doing a small amount of
OO, then I say there is hope for OO in CF and for the masses to learn
this. Encapsulating functionality into a CFC and putting into
application scope seems like a good place to start learning OO. The
next step may be to use a factory to instantiate that user.cfc when a
user logs on.
I guess when Hal says don't do OO in CF, I would ask does that mean
don't use CFCs at all? Is the performance hit so bad that even Ben
should abandon his 5 or 6 CFCs and go back to UDFs?
Brian, Hal, & Ben, thanks for taking the time to put this together. I
think the discussion is quite interesting even though "OO won a long
time ago."
-Matt Williams