I hear you John. At this point, i'm not even sure how to refer to the instance that Application.cfc creates. I dug up the post i've been referring to:
****** "This is actually exactly what we do (and many others), and unfortunately, you�re not going to find a solution for what you�re looking for without resorting to cfmappings. In our case, since we can�t use mappings (or rather, refuse to), that means we can�t use inheritance in many situations. This, unfortunately, includes all of the neat inheritance things you can do with Application.cfc Roland" ****** I was thinking i must have missed something that everyone else knew about by now (wouldn't be the first time!). -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of John Farrar Sent: Saturday, March 05, 2005 3:22 PM To: [email protected] Subject: Re: [CFCDev] extending Application.cfc? OK... if you "extend" it... when would it execute? How would CF know to call it. If you are just using it as a standard component in your application by creating an instance of the class and consuming/using that object then that makes sense. (sort of) Why would you do that? I do not believe you can "extend" on an inheritance base application.cfc and have CF call it as the application common file. Now... I believe you can add addtional functions to the applciation.cfc file and call them from the "trigger'd" methods of that class. If someone is doing something like that it would make sense. Here are my thoughts in that area... * User Authentication * Script Protection (calling of certain CF scripts only like if fusebox they would call only the core index.cfm, and block others) * Logging Applications, Sessions, and Requests (Visits and details) * Doing things like storing a shopping cart when a session ends... or storing the application variables when a application times out to reload instantly on next request. I don't know if that deals with the question at all... it seems to be framed a bit odd. Extending a component that is called directly wouldn't be meaningful since the inheritance wouldn't be related to application.cfm. It's a bit like asking about imitating an actor and adding personal touches to a performance. The performace that is extended may be better... but the original actor is the only one who takes the stage. So with that said... when would you ever extend Application.cfm on an inheritance basis that the extended class would take the stage? John Farrar ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
