Hi,
I would agree with Adam as well. Many CF programmers use cfcs
as more of a code organization tool and essentially a file full of
related functions. Even though CF is not an OO Language, it does
borrow some of the concepts at least that is what I think.
Things like inheritance, encapsulations, etc can be achieved,
you can get into having the standard beans and data access objects,
so you might have a Person.cfc and a PersonDAO.cfc that would
handle Create, Read, Update, Delete functions for that bean.
I also like craig have some persistent objects that I load at
Application Start as well as how he mentions his code jives with
everything else or whatever..... writing in the more script like
syntax which I believe is based on ECMAscript is similar to
actionscript and javascript as well so with all the Web 2.0 buzz
whatever Web 2.0 "really is", I think it behooves one to write code
in script where possible so when you have to write some javascript
or actionscript your good to go. One developer told me he uses
cfscript for his business logic primarily.
On a display page I would use a <cfloop> tag as opposed
to doing some "for loop" in cfscript and using writeOuput() to
display in an html table. <cfscript> can also be shorter. If
you have to set a bunch of default variables in a cfc I think a
cfscript block is cleaner, its shorter, just looks better, and may
perform faster in some cases, but I am not sure if that is proven,
a lot of factors can affect what would appear to be application
performance.
I rambled, but hopefully you can find some value in the
comment and the others as well. This forum is not as active as it
used to be, but it has helped me a great deal and I am still
learning.
In fact, now that I think about it, Adam had posted responses
to some of my questions when I was initially getting into CF. (Not
suggesting your getting into CF)
-Westside