Hey Andy,
I think it's a similar question compared to using a framework or not 
using a framework.  Not using a framework isn't fundamentally wrong, but 
it does make code-reuse, maintenance, and scaling a little more tedious.

I think the goal here is abstraction.  Do as much as you can so that you 
don't care about where you're getting the data - you're just getting it. 
  From the other direction, the query method is pulling data for what, 
it doesn't know, nor does it care.  Then, with CFC instances, you can 
make objects unique to an initialized set of data which is pretty neat 
instead of hard-coded methods that aren't very portable.

I am still learning this as well.  You might want to study the bookstore 
app written by Brian Kotek.  Take a look at how he's instantiating all 
of his objects:

http://www.briankotek.com/index.cfm?fuseaction=coldfusion.main

take a look at the fusebox.init file.  It's comparable to the 
application.cfm file in non-fusebox apps.  Also, take a look in the COM 
directory for all the CFCs.  I learned a lot from reading through all 
his code (and reading the fusebox book).

Mike

Andy McShane wrote:
> This thread caught my eye and I would like to add a question of my own if I
> may. I am relatively new to CFC's and am still getting my head around them.
> I have written CFC's that only contain database calls in individual
> functions that are all relative to specific areas of my site, so I have a
> CFC called matchreport.cfc that handles all select, insert, update & delete
> database calls, this is all that the CFC does, is there anything
> fundamentally wrong with doing this or is there a better way to handle this?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221829
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to