tags:

views:

522

answers:

3

i am actually picking up flex. when i made some "Hello World" apps, i noticed that Flex seem to load v slowly compared to HTML versions (once loaded speed is normal). is Flex slow? maybe it will be better if i compare it to a more complex app, say with a few forms etc?

i am actually intending to learn AIR. i get the impression that Flex is more suited for a real app than HTML, as it has Data binding capabilities etc. but if its slow for even a Hello World app, i wonder how it performs in a more complex app.

i dunno but is AIR designed for Flex than HTML & Flash?

+1  A: 

Flash will load more slowly than HTML because they're loading the entire flex framework as well. So there's much more to download than a simple HTML page. That being said, bigger applications don't necessarily get better on load times.

You only really need flex over HTML these days if you want to take advantage of vector graphics and advanced animation, and even those are getting better in browsers with svg/canvas/vrml and the javascript frameworks.

Glenn
By default Flex apps only load the portions of the framework which are used. Using the Flex Framework RSLs will cause the entire framework to be downloaded (about 500k) but that only happens once for each version of Flex. The Framework RSLs go into a cross-domain, cross-application cache.
James Ward
Yes, but even with the RSL, you're still likely going to be pulling down more bytes for flex than html. But there's always exceptions depending on the content of the sites.
Glenn
Surely you mean **Flex** will load more slowly than HTML. **Flash** does not require the Flex framework.
Richard Szalay
Flex is rendered in flash. The OP was talking about a flex application. You can render an HTML application using Dojo or JQuery, but it is still HTML and JS.
Glenn
+3  A: 

A hello world Flex app can result in a SWF file (the application) which is about 300k. It is likely that downloading that SWF is what is taking time. If so then there are some ways to reduce that file size. The Flex Framework RSLs can reduce the size of a SWF significantly by putting all of the Flex classes into a cross-site, cross-application cache. Also, make sure that you are doing a release build on the project. That also significantly reduces SWF size by removing debugging information.

Flex apps are very different from HTML apps. They run client side and then once loaded they usually only make requests to the server when they need to get or update data. So the initial download size will be more than HTML but then subsequent user interactions should be very responsive. Also binary serialization protocols like AMF can help to significantly reduce the size of data moving over the wire.

Flex apps can run in the browser with Flash Player or on the desktop with Adobe AIR. But it's the same architecture and components used to create either type of application. Also with Adobe AIR the application needs to be installed (along with the Adobe AIR runtime). So Adobe AIR probably won't help you application load any faster.

James Ward
Besides AMF, there's nothing about the 2nd paragraph that can't be done using HTML/js and "ajax" calls. And with gzipped HTML/js requests, AMF won't make too much difference.
Glenn
I built an application called Census which measures exactly this:http://www.jamesward.com/censusAMF does have other advantages. Faster serialization, faster deserialization, etc.
James Ward
A: 

it's really help when I embeded the released builder swf ,it's faster for about 10s to load them than using builded swf,thanks a lot.

dalianjiazheng