On 12/16/05, William Langshaw <[EMAIL PROTECTED]> wrote:
> To get around this whole issue one CAN use returntype="any" (and even
> returntype="struct" works for OBJECTS, yes objects!). We got our code
> to "work" this way but it feels like a total kludge. Whether its a
> distant possibility or not, what happened if one day Macromedia
> upgraded CF and made it stronger typed, then all code that relied on
> returntype="any" would crash and burn, right?
>
> My colleague's attitude is that "returntype="any" works, lets just run
> with it and if Macromedia pulls the rug under us one day, we will deal
> with it then". My attitude is to do it right the first time, but it
> might not even be possible (our goal is to build a complete CMS
> solution where one can add "sites" on the fly, they all get driven off
> a mapped core set of CFCs but then there are customized CFCs that live
> under each site and we need to find a way to have these CFCs have
> "flexible" returntypes since we dont know what those are ahead of
> time, e.g. drag-and-drop site creation/deployment.)
>
> My ultimate question is: how "safe" and "reliable" is using
> returntype="any"? Is it a big performance hit too?
>

William, I just blogged about this very question because I wasn't sure
how "safe" it would be from a forwards-compatibility standpoint. The
consensus was that the WEB-INF.cftags.component returntype is safe
across versions of ColdFusion MX, including Macromedia vs. New
Atlanta. I would use that instead of "any." As Sean noted in one of
his comments to my entry, a nice enhancement in Scorpio would be to
add a returntype="component" option.

http://www.cbetta.com/blog/index.cfm/2005/12/9/return-type-for-returning-cfc-instances

Regards,
Dave.


----------------------------------------------------------
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]


Reply via email to