Recently I was looking at Node.js and one of my Flex-based file upload examples, and thought it would be worthwhile to do a side-by-side comparison of the two techniques. As a huge fan of Flex, I really like to work with it, but Node.js is an interesting technology too. |
Flex-based version :
The Flex-based version has some nice benefits:
-
The developer can work with a mature set of MXML tags and ActionScript 3, both of which are compiled into a write once, run almost anywhere Flash swf - pretty much immune from browser wars and platform differences.
-
Front-end validation to limit the size and type of file uploads is easy and saves a wasted trip to the server.
-
It's easy to include some nice cosmetic features - including (in this example) a preloader screen and a file upload completion bell or whistle.
-
Self-documentation (view source) is easy to bake-in to the application.
-
Can be coded with everything from notepad to Flash Builder.
Click to upload a file with the Flex-based version.
Node.js-based version :
The Node.js-based version has some nice benefits too:
-
The Node.js-based version loads faster than the Flex-based version.
-
Front-end validation to limit the size and type of file uploads is easy (with JavaScript) and saves a wasted trip to the server. The size limit is actually determined from submitted form data, differing from the Flex-based version's capability. Additionally, by 'googling' Node.js form validation, you'll see listings for form validation add-on modules.
-
Self-documentation is also possible - take a look at Commander, but Flash Builder's 'view source' generation wins in my honest opinion - in the ease of use.
-
The Node.js version is fairly easy to code (JavaScript syntax) and there are Node.js IDE's (Nide and Cloud9 are two promising IDE's), but Node.js code may be prone to certain browser differences.
Click to upload a file with the Node.js-based version.
Personally, I will continue to explore both of the environments. Based on the application I plan to build, I can see that working with either technology could have benefits. For more informaion about Flex, go here. For more information about Node.js, go here.
Tip Jar:
|