Well, this is a heady issue that I expect not too many people on this list
have a lot of experience with.

Now that I work a lot more with CF and Actionscript, I am having to ask the
same question, when is it appropriate to process data on the server side and
when should you stick with the client. The answer is almost always on the
server side, and here's my logic: 

1) Flash's performance is hindered by working with large data sets, at least
for right now. Parsing large XML documents, retrieving gigantic strucures of
data, etc. all take time and adding the overhead of calculations on the data
is not worth the impact on users. Flash can slow to a crawl, events can stop
firing until long after they were supposed to happen, the movie itself can
seem to freeze - and this is just the beginning. Users are not working with
RIAs to have to put with this stuff, and developers need to take it
seriously. For anything besides the most trivial data sets being sent back
to Flash, it makes sense to package the data so that it will be ready for
use in the movie.

2) CF is much better at performing calculations than Flash. This may sound
like the exact converse of #1, but with the hundreds of functions, tags, and
CFSCRIPT, you have many more tools at your disposal than you do in
Actionscript. Having to rewrite functions in Actionscript that are already
in CF is redundancy considering you are not prevented from working with your
data prior to returning it to the Flash client. 

There are always exceptions to these rules, especially considering the CF
side has to scale to accommodate all users with the Flash client. At the
same time, I feel preserving the user experience through more work on the
server side is superior to sacrificing the qualities that make RIA a more
attractive solution in the first place. I would rather add an extra server
to handle the load than have a bunch of users who are spending 30% of their
time with my app waiting for data to process. 

M

-----Original Message-----
From: E. Keith Dodd [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 10, 2003 7:56 AM
To: CF-Talk
Subject: In General: CF vs ActionScript


Am just getting started using ActionScript and Flash Remoting. Am surprised
at all that can be done with data using ActionScript. However, it *seems*
best to do as much of the data manipulation as possible back in the CFMX's
cfc, before sending it to Flash. For example, I am sending a structure to
Flash. Use some ActionScript to retrieve from the structure and display. Was
using ActionScript to make a determination whether to make a certain button
visible based on the date. Realized that I could have made that
determination in the CFC and passed it along in the structure.

Is it a wise rule of thumb, that all else being equal, use CF rather than
ActionScript where possible? Obviously, would depend on specific situation,
but in general...?

Appreciate any thoughts on this.

E. Keith Dodd
Wings of Eagles Services
www.wingserv.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to