CFC methods are UDFs and UDFs have to stand alone, so that
necessitates them being their own class.  There isn't a performance
implication (at least not one that matters), and it's enormously more
flexible this way.  As one simple example, you can do mix-ins because
of this structure.

On 4/11/07, Joseph Frank <[EMAIL PROTECTED]> wrote:
> Thanks....that cleared things up for me.
>
> I still cannot understand why CF would compile CFC methods into individual 
> Java classes and necessitate the shared function-class references. Unless 
> this is how Java does it as well internally........
>
> Joe
>
> >That's classes, not instances.  There's a huge difference.  Joe's
> >description wasn't totally clear; here's what I think he was trying to
> >say (and I agree with):
> >
> >Each CFC instance has a reference to a shared singleton for each
> >function.  So the first CFC of a given type will create n+1 instances
> >(where n is the number of functions), and then all subsequent CFCs
> >created for that type will only create 1 new instance and reference
> >the preexisting instances of the functions.
> >
> >cheers,
> >barneyb
> >
-- 
Barney Boisvert
[EMAIL PROTECTED]
http://www.barneyb.com/

Got Gmail? I have 100 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:275047
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to