I have been using application-cached CFCs for a while now with great
success. You are certainly saving some overhead of instantiation -- which
can be the most expensive part of using CFCs. I have not experienced any
problems, but the apps I've tried this in aren't under heavy load. I think
Sean talked about using this technique in Macromedia.com, however, which
certainly gets fairly heavy traffic.
Yes, although we use server scope (since macromedia.com is one big application and shares services between 'applications'). We also create a lot of short-lived components and we haven't really found the "15ms" creation time to be a performance problem.
The creation time is heavily dependent on a number of factors, including: number of methods in your component and what it inherits. I'd say that in a well-designed OO-style system, your components will either be stateless (service-like) and can be cached in application / server scope or they will be small, lightweight and fairly fast to create.
The obvious warning is to look out for the page context but, but if you are
following the rules of encapsulation so often preached on this list you
shouldn't run into that (and should one day soon not have to even think
about that either).
Correct - it's fixed in Red Sky (coming "this summer").
Obviously, using session-cached CFCs won't work in a cluster (absent sticky
sessions).
If you're using a cluster, you already have to deal with session data. Frankly, I don't see why so many people make a big issue out of this - sticky session is just fine for almost all real world applications. The only concern might be session replication / failover - and not many applications really need that (CFC instances cannot replicate but 'ordinary' session data can).
Sean A Corfield -- http://www.corfield.org/blog/
"If you're not annoying somebody, you're not really alive." -- Margaret Atwood
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
