Final thought and slightly off-topic is my obsession with singletons, called 
Singletonitis.

In Coldfusion we have always feared the Object Instantiation Penalty (OIP) and 
I have tried to avoid creating objects as much as possible and use singletons 
managed by Coldspring or custom factories.

Downside to this is the object has no instance data and everything has to be 
passed around in methods, making the readability less appealing when you have 
lots of small methods that need lots of things passed in.

So I'm slowly weaning myself off this fear and sometimes creating new objects 
when it makes sense. I even have a Gateway that has lots of small methods 
building sql strings that isn't a singleton and I'm proud of it :-)

And with each CF release the OIP becomes less of an issue.

 Alan
www.alanlivie.com




________________________________
From: John Whish <[email protected]>
To: [email protected]
Sent: Friday, January 9, 2009 10:15:19 AM
Subject: [CFCDEV] Re: Analysis and Design process

Thanks for your replies Alan, 

Yeah, I agree with his approach. I just need to think more about behaviours and 
message sending instead of focussing on the actual objects. Bit of a change of 
mindset and I was having a hard enough time thinking about objects :)

Like you I am improving though, slowly but surely, although it does feel very 
slow! :P


      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to