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.

  • 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
  • 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)

  • 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
  • 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.


New Firefox 4 beta 7 is really fast

I just downloaded and installed the latest Firefox 4 beta 7 and man it is fast! The browser loads in an instant, not like beta 6 that took a minute to initialize and the pages come up in a flash! - couldn't avoid the pun :) There are also minor UI tweaks that are easy to notice.

You download it here.


Great prez about the future of Flex (from MAX 2010)

Just saw Deepa Subramaniam's MAX 2010 presentation on the future of Flex and it is cool! If you are doing Flex development or are planning on doing so for the first time anytime soon, then I recommend you view her prez. She begins by talking about Hero, the latest Flex version currently being worked and then to talk about the future of Flex and the Flash platform and my favorite part was "Falcon"; the complete re-write of the Flex compiler. With "Falcon", we will be able to keep the "auto-compile" feature in Eclipse ON for good and not worry about slow downs while working on projects. But don't take my word for it...watch the prez for yourself!

So I guess Flash is popular afterall

With all the negative comments Flash has been getting in the last year, especially since the Steve Jobs essay back in April, it is nice to see that Skyfire, an iOS application built to convert Flash content to HTML5 has sold out 1 day after its initial release. Basically the Skyfire servers have been overloaded because too many users were viewing Flash content! Well time to get more servers eh?! :)

Skyfire sells for $2.99 on the app store.