RE: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Dave Watts
Is anyone extending Application.cfc? I never thought of that before. It's a fairly common practice in my experience. There are a few reasons why I might do it myself within an application. For example, I might want to present HTML and SOAP interfaces, and use the OnRequest event handler for the

Re: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Peter J. Farrell
Aaron Roberson said the following on 4/23/2007 9:53 PM: Is anyone extending Application.cfc? I never thought of that before. Last fall, Mach-II released Application.cfc support by xtending the mach-ii.cfc. This gave the user access to certain boostrapping method like loadFramework (for

RE: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Brent Nicholas
Is anyone extending Application.cfc? I never thought of that before. I do it just to make sure my Datasource, Schema and a few other high level vars are always present. But then again, I'm not doing any OO cfc work. BNBrent Nicholas - There, I guess King George will be able to read that! -

Re: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Aaron Roberson
Dave, Are you saying that you are using Application.cfc to serve up your headers like folks used to do in the past? I am trying to understand how you would use Application.cfc for serving up your interfaces. -Aaron On 4/24/07, Dave Watts [EMAIL PROTECTED] wrote: Is anyone extending

Re: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Aaron Roberson
Peter, That sounds like a good use case. I would like to read up on this a bit more. Has anyone blogged about extending Application.cfc in their applications? Thanks, Aaron On 4/24/07, Peter J. Farrell [EMAIL PROTECTED] wrote: Aaron Roberson said the following on 4/23/2007 9:53 PM: Is

[CFCDEV] Oh how I wish we had method overloading!

2007-04-24 Thread Aaron Roberson
I have a question that could be answered with method overloading but since CFML is dynamic we don't have that option. What I do you suggest I do instead? In my service layer I have a method called saveObject(). At present it takes an object as the argument and does this simple bit: return

RE: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Scott Pinkston
Two answers for price of one tonight. Dave, Are you saying that you are using Application.cfc to serve up your headers like folks used to do in the past? I am trying to understand how you would use Application.cfc for serving up your interfaces. -Aaron For this example, your header footer

RE: [CFCDEV] access to applicationname in extended CFC

2007-04-24 Thread Dave Watts
Are you saying that you are using Application.cfc to serve up your headers like folks used to do in the past? I am trying to understand how you would use Application.cfc for serving up your interfaces. Typically, no, but I might want to rewrite request output in OnRequest for HTML

Re: [CFCDEV] Oh how I wish we had method overloading!

2007-04-24 Thread Patrick McElhaney
Why do you need method overloading? Why can't you just have two different methods with different names? It looks like the methods aren't really doing the same thing anyway. The first takes an existing object and saves it. The second creates a new object and saves it. Patrick On 4/24/07, Aaron

Re: [CFCDEV] Oh how I wish we had method overloading!

2007-04-24 Thread Peter Bell
+1, I support both approaches, but one is saving an object so I call it saveObject(Object: object) and the other is saveStruct(Struct: struct, PropertyNameList: string). In the first I¹m taking a well formed object and depending on my implementation either asking it to save itself or asking it for

Re: [CFCDEV] Oh how I wish we had method overloading!

2007-04-24 Thread Aaron Roberson
Peter, Thanks for that very informative reply. I think I will take Patrick and your advice and create two methods, one as saveObject() and the other as saveStruct(). @Patrick - To answer your question, I percieved both methods as ultimately doing the same thing (persisting an object) and didn't