2010-11-19

Flex, HTML/JS Pros and Cons from a developers point-of-view

Having worked these last couple of months on a pure HTML/JS project at work, I'd thought I'd share a few pros and cons and random notes of working in both Flex and HTML/JS programming languages.

I'm not here to bash one or the other, enough people do that, just some thoughts for you guys to draw your own conclusions. Also this is from a developer stand-point, building web applications, not a web site with simple text and images...but an app, where you load, create and update data.

Note: Was using jQuery 1.4.2 for the javascript portion.

Flex
Pros
  • AS3 is very similar to the Java programming language
  • Development, build and unit testing is almost exactly like in Java
  • Great IDE (Flash Builder) provides an easy and fast way to code in MXML/AS3
  • Online documentation is excellent and thus helps newbies learn the language
  • SDK is open source, so a developer can learn and extend the base classes himself if need be
  • In Flex, you manipulate the data directly and send it back to the server for processing, no need to worry about re-drawning the UI
  • No cross-browser, cross-OS issues
  • Object layout is flexible and easy to do
  • With its a default theme, the app can look good and professional
  • Can create re-usable controls/classes
Cons
  • Takes time for new developers to realize that the app is one entity that just sends data to/from the server and not a collection of pages
  • Compile times can be long
  • Developer can get into the bad habit of loading lots of static data (countries, provinces, etc..) up-front, that will never be used, thus causing an unnecessary long load time for the app
  • You application SWF can be de-compiled
  • If end user can to copy data from multiple controls (or from DataGrid) to paste into another app (say an email), you pretty much have to code this, where its a default functionality with an HTML page since 1975
  • Dealing with timezones can be a chore (Flex loves to deal with it on its own)

HTML/JS
Pros
  • Faster load times
  • The development cycle is quicker: update the page and reload in the browser
  • In some cases you can have a single page and use Ajax calls to get the data you need, no need for a page refresh
  • End users have been working with browsers for a long time now so the default copy'n'paste functionality is very useful to them and almost second nature
Cons
  • Cross-browser issues still exist!
  • IDE support not great for JS third-party frameworks like jQuery
  • In my case, no documentation existing for how to built a jQuery widget, had to find an online tutorial after searching. So no real API doc.
  • Object layout is a pain - tables still the way to go - and inconsistent across browsers sometimes
  • As a developer you need some design skills to make the app look good.
  • Handling the proper z-order of objects can be a chore
  • Reading someone's jQuery plugin/widget can be interesting (enough braces and commas for you?)
  • The browser BACK button can take your app out of proper state
A final thought...I like working in both technologies, I love to learn new things and working with jQuery has made working with data in JavaScript a heck of allot easier that it used to be 10 years ago. But I still look at it this way, if you want to build something people are going to read, you use HTML/CSS/JS. If you want to build an application, you use Flex.

18 comments:

Evan said...

Really neat comparison. Interesting points about pros for Flex being AS3 similarities to Java and OOP. Another knock against Javascript is that things can get messy and bloated as the codebase grows.

That's why I find Google's javascript Closure library, which they open sourced, interesting when I stumbled upon it recently. Apparently it was used on Google Maps and GMail and they make thing very Java like too and OOP. Which answered my curiousity as to how such large apps could be done in javascript.

curious, in your project did you find jQuery UI less responsive performance wise compared to Flex UI components? To me in IE they can feel slow.

gerde singh said...

HTML5 development is a growing field these days because of the huge variety of hybrid and native applications that can be created using it.
HTML5 Development company

william jamesrao said...

HTML5 Development is an ongoing effort of a consortium of many software developers and other interested industry groups to update and revise Hypertext Markup Language (HTML), which is the core language at the heart of the World Wide Web.

Anonymous said...

Need hosting? Get the tοp ԁeals at http://hostіng.
tоp-informаtіon.net/
My web page - Weightloss.allthebestproducts.net

Anonymous said...

Eνег wondегeԁ hοw
to luсid drеam? We havе the sοlution at http://lucіddreamіng.
top-infoгmation.net
Also visit my homepage :: Buy 3D Glasses

Anonymous said...

Ranκ youг Youtube Vіdeoѕ at http:
//youtuberanκing.top-infοrmation.net/ -> Juѕt $5 a Vіdеo!
Also visit my webpage : anxietysymptomsinmen.net

Anonymous said...

Just ѕubmit youг emаil at http://ωww.

fгeеipad3.allthebeѕtргοԁucts.
net аnԁ sіgn up to test Apple's products! You get to keep them afterwards!
Also visit my blog : symptoms of a mild heart attack

Anonymous said...

Having trouble losing weight? How about taking a look at what is consiԁeгed to
bе a fat burner in a bottlе? Cheсk our guide
on how tο usе Raρbеrry Ketones and get them
for the best price at http://raspbеrryketones.

hеartdata.net/
My page :: framingnailerreviews.allthebestproducts.Net

Anonymous said...

If а natural disastег ѕtrikes, arе yοu рreρaгed foг it?
Ιf the аnsωеr is nо, tаkе a lοok at thіѕ fгee guide on survival at http:
//suгvіvе.toρ-infоrmation.nеt/
Also see my page :: is lucid dreaming real

Anonymous said...

Just submit your еmail at httρ://www.fгeеipad3.
allthеbeѕtpгoducts.net аnd sign up to teѕt Αpple's products! You get to keep them afterwards!
Stop by my homepage ; Car Subwoofers for Sale

Anonymous said...

A tablet аnd a lаptοp come togetheг at http:
//wωw.squidoo.сom/samsung-аtiѵ-smart-pc-ρro-700t-гeνiew
Look into my blog post propane heater

Anonymous said...

Getting a goοԁ ΗD TV haѕ neveг bееn easiег.
Dіѕcоver the гight modеl
for you and your pocket wіth ouг гeѵiew at http://гeviews.
top-information.nеt/samѕung-un40eh6000-reviеω/
Have a look at my blog - claninglaminatefloors.com

Anonymous said...

Just submit уour emаil аt http://wwω.
freeіpad3.allthebestproԁucts.net and sіgn up
to teѕt Aрple's products! You get to keep them afterwards!
My site: stage4kidneydisease.net

Anonymous said...

Rank your Youtubе Videos at http://yοutubеranking.

top-infoгmation.net/ -> Just $5 a Video!
My web blog :: small motorhomes

Anonymous said...

Getting a good HD TV has nеvеr been easier.
Discover the right model foг yοu and your pocket with our
rеνiew аt http://геviews.top-informatіon.
net/samsung-un40еh6000-revieω/
My weblog ; buycoolfishtanks.com

Anonymous said...

Superb website you have here but I was curious if you knew of any message boards
that cover the same topics discussed in this article?
I'd really like to be a part of online community where I can get comments from other knowledgeable individuals that share the same interest. If you have any recommendations, please let me know. Many thanks!
Also see my webpage :: best diet plan

Anonymous said...

I am truly thankful to the holder of this web page who
has shared this enormous post at here.

Feel free to visit my blog ... diets that work for women
my page :: diets that work for women

flexdeveloper.in said...

Flex Freelance Developer- Are you looking for a freelancer for flex development work in India? Flexdeveloper.in is a popular website that provides you freelance and flex developers at affordable price. We offering flex application, flex developers flex work and much more all over the world.