Flex, HTML5 or iOS: Where are things going?

Given the big announcements this past week from Adobe regarding their abandonment of the mobile Flash Player, along with their statements about their plans for Flex, I figure it is time for me to chime in with my own thoughts.

I cannot say I was surprised by these announcements. Technology waves happen all the time and I have jumped to different platforms many times over the past two decades. In my PwC and IBM Consulting days, I worked in Lotus Notes and Domino until it became easier to build database driven web applications with Java Server Pages sprinkled with Javascript (soon to be Ajax) code. Then in 2003, I decided to jump again, this time to whatever could save me from the hacky nature of Javascript and pain of multi-browser support.

So I started looking at alternatives. Flash was an obvious choice but was still mainly for artistic designers looking to create static content. Open Laszlo initially won me over with it’s ease of use and low cost. At least until Macromedia jumped into the fray with Royale (which would ultimately become Adobe Flex a couple of years later) shortly afterward. It would take another year before Adobe would figure out that no one wanted to pay $15,000 per CPU for a server to generate SWF files, especially since that step is unnecessary to begin with. By the time Flex 2.0 came out, Adobe had wised up on how to monetize Flex and things really took off. Flex and the Flash Player had finally accomplished what Java Applets and the JVM set out to do but never achieved: provide a portable and consistent web-based platform for complex applications. I jumped on the Flex bandwagon and never looked back…until a little over a year ago.

That’s when it was becoming apparent that Steve Jobs was slowly being proven correct about the shortcomings of the mobile Flash experience. At the time, I did not feel they were wrong but they did not offer any real alternatives. They claimed HTML5 was the future but since no browsers fully implemented that specification (and still don’t), it seemed like a non-starter. The goal was still to write cool-looking, complex applications in a real programming language using a powerful IDE for a consistent runtime environment, and the Flex+Flash combination still seemed like the only offering that provided anything close to that.

However, the more I looked again at HTML and Javascript, I realized that the tooling had dramatically improved, especially with the emergence of two things: javascript libraries and browsers with debugging facilities. I knew those technologies had appeared years before, but it was their maturity that now caught my attention. Unlike some developers, I fully embrace the latest technology available to programmers. I’m a firm believer in IDE’s over a vi editor, debuggers over trace statements, and profiling tools over timestamps placed at the start and end of methods. It now seemed possible to create dynamic web apps that ran well in more than one browser, and the whole thing could be developed quickly without going blind from staring at alert dialogs with vague ‘blah is undefined’ javascript error messages. Don’t get me wrong, Javascript is still every bit as hacky as before, but jQuery, Dojo and ExtJS help shield you from much of that pain.

The real challenge will be to figure out how to create the same results in HTML5/Javascript that I was doing in Flex. Take drawing for example: the capabilities of SVG and the HTML5 Canvas fall short of what the Flash player can do when combined with Actionscript and Flex, but tools like EaselJS, Raphael, and JQuery SVG are avenues to get you part of the way there. Even Keith Peters is working on a book to help Flex developers make the transition that strongly mirrors his Actionscript version.

I honestly can say I’m surprised at how brief the Flex wave has been. I figured it would last 10 years, but it seems to be more like 6 if you figure that Flex 2.0 was released in 2006 and I expect a fairly strong decline by the end of 2012.

And no, Flex will not go away but it is reasonable to expect that the demand for it will. I will continue to use it where applicable, but over the past year or so, I’ve moved heavily into HTML5 and Javascript as well as Objective-C and the iOS platform. Seeing that the performance of HTML5 web applications running in mobile Safari is still a little slow for my tastes, native iOS applications have become very attractive. All of this partly explains the severe reduction in my blog posts over the past year or so, combined with the fact that I’m a father now and family time is very appealing these days.

So in summary, I’m still doing my best to create neat stuff, but these days it is with a different set of tools. Geoff Sterns sums up my thoughts exactly at the end of this post.

Flex 4.5 is out!

After weeks of waiting since the mid-April announcement, Flex 4.5 and FlashBuilder 4.5 are finally available. Download it here!

Tile Options Demo using Flex 4

In a previous post, I showed a demo of a custom list component created with Degrafa.  I received a request for the same application done with Flex 4 and FXG, so I spent a little time converting it over and here is the result. (** requires Flash Player 10)
Read more… →

Core Flex 4 – Filters in spark.filters vs flash.filters

After looking briefly at the API docs, I noticed that there are duplicates of several of the filter classes with the same name.  For example, there is a DropShadowFilter in the spark.filters package and there is another one by the same name in the flash.filters package.
Read more… →

Core Flex 4 – Elements vs Children

When I started using Flex 4 I tried to get up to speed by using the new version in a manner similar to its predecessor until I came across roadblocks or when I determined I was able to take advantage of the new features I had heard about such as skinning, states, etc. I quickly found that there were some obvious Flex questions that I was not able to answer without diving into the API docs and by playing with some examples so I could truly understand what is going on.   I knew from past experience that Halo was hiding a lot of the dirty details about what was going on in the display list, but once you start using Spark, you will come to see just how much Halo was really doing under the covers and why Spark is a much more ‘honest’ way of working with the display list.
Read more… →

Spark Physics with Flex 4 Components and Box2D

A while back I created a few demos showing how to combine ActionScript physics engines (as well as 3d engines) with Halo components to create a physics-enabled UI. I wanted to see what could be done using the new Flex 4 Spark components and I was very surprised to find that almost nothing had been posted about using physics engines with Flex 4. Read more… →

Flex 4 Released

I just checked the Adobe.com website and they’ve posted the links for the officially released versions of Flex 4 and Flash Builder 4. For those of you who have not yet taken a look at the great new features in Flex 4, I would encourage you to check it out. It is simply awesome.

The getStackTrace Super Bug

If you happen to be hitting an issue where an application runs fine in the debug version of the Flash player but hangs up in the normal version, read on. This could be your problem.

I’ve made good use of a tip I picked up from McCune on generating a stacktrace in my logging statements so that I can not only see the method that was called but also from where it was being called.
Read more… →

Grading System Demo

When I started getting into Flex several years ago, the first real application I created was an online grading system for a small K-12 school that I was consulting with as a side gig.  That was around 2005, and after several years of use, the school has outgrown this initial design.  Since they are no longer using it, I decided it would be ok to publish a demo.
Read more… →

Teacher Demo

PeekPanel – My New Flex Component

This is my latest experiment which I’ve named the “PeekPanel”. I saw this type of animation done on my phone and figured it would be a cool way to hide options or preferences in an application.  It borrows the look and feel from the FlexBook/PageFlip components already out there, but instead of simulating a book, this is more of a way to use the “flip” to hide other components.
Read more… →