Jason Davey wrote, On 11/2/2006 1:07 PM:
Sammy:
Thanks for your response. I am concerned about memory space allocation
because I'd like to understand how exactly the server processes a
cfcomponent so I can better standardize my component implementations. Adobe
does not readily provide tools to see how the CF Server is parsing through a
component line by line - so call it an exercise in curiousity. I'm working
on finding something that helps me understand the server side in detail -
perhaps you could recommend something. CFDebugger.com is the closest I've
seen as a practical tool, cfperformance.com is a $49 pdf that discusses the
underpinnings of the Java based server and CFML processing - if anyone has
opinions on either of those, I'd be grateful.
Well, I haven't tried any products like that, but it certainly sounds
like a fun exercise. I have seen advertisements for (I think it was
called) coldfusion reactor, and from what I recall, it sounded like it
might help. Raymond Camden, I believe, did a review of it on his blog
quite some time ago, so he may be able to tell you more about it, and if
it would suit your needs.
Thanks for your other opinions. I love setting constants - the application
scoped stringNull and many other variables I set is a technique to avoid
writing "" everywhere. In general, it is not good practice to stick literals
in your code. It is much cleaner (in my own view) to declare literals as
constants upfront and reuse those references in the rest of the application.
As for having application scoped variables in the CFC's - it works great for
my application - there's not much chance of me porting these same CFC's to
other applications because this application is enterprise wide - it is not
one of a set of very separate mini applications that might benefit from
calling from a standard library of CFCs.
I definitely know the pitfalls of hardcoded strings in the code - I just
inherited an app where one of the roles was hardcoded, and the customer
wants to change the display name of a role. Not fun =). But, I was
more talking of the "" blank string part. That, as far as I can tell,
is quite unlikely to change. In any case, follow the good practice.
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]