Monday, January 16, 2012
Flash vs. HTML 5
Note: This article is about the Adobe Flex SDK, not Flex Rental Manager.
Adobe seems to be in a state of crisis: not along ago they announced a bold new initiative to compile Flex 4.5 to IOS and other mobile platforms, which to us signaled a long term commitment to Flex. Since our whole front end is built in Flex and runs on Flash, this was relevant to our interests.
Then, in a series of shocking announcements, they pulled their plans for mobile platform support and then announced they were thinking of donating Flex to the Apache Software Foundation, citing the upcoming release of HTML 5. Needless to say, this led to some introspection around here and a close look at the HTML 5 draft specification. More on that later.
Apple's never been a fan of Flash. Steve Jobs has been very vocal about it and claimed it was a waning technology. I think that's just another example of NIH syndrome running rampant at Apple and I think users of Google Analytics, YouTube, and FarmVille might disagree with Steve's assessment of Flash.
I hate to be disrespectful of the dead and Flash is a lot of things, but a waning technology isn't one of them. In fact, there are few web technologies as ubiquitous as Flash. It's everywhere. Microsoft even launched their own project, Silverlight, to compete with Flex/Flash. (Our friends at Production Exchange use Silverlight.) And as of yet, there is no suitable replacement for it, not even HTML 5.
Flash does have it's problems, however. The FlashBuilder development tools have memory leaks galore and the Flash runtime could do with some serious enhancements. Moving the Flex SDK into the open source community could work wonders for these problems and perhaps make Flex even more useful. If the Flash Player follows the Flex SDK into the OSS world, it could even lead to embedding the Flash Player into browsers since the Apache license allows incorporating open source software into closed source or commercial platforms.
With that being said, I do like what I've seen so far of HTML 5. It cleans up some of the loosy goosy formatting issues in HTML 4 and provides new API's for 2D drawing and video. Much of the ubiquity of Flash is due to its video support and I do think HTML 5 will displace Flex/Flash when it comes to video and some of the simpler web based games.
Again, I do think HTML 5 is a great improvement over HTML 4. I'm excited to work with it and it will simplify traditional web development. But Flex Rental Manager is not a traditional web site -- it's a full screen RIA, rich even by Rich Internet Application standards. It's not a typical use case, so judging HTML 5 by how it lends itself to our purposes isn't really a fair means to evaluate it. We prefer Flex over Ajax because our time is limited and we can't afford to spend our time building components or testing (and working around) browser idiosyncrasies.
I liken HTML 5 as it applies to rich internet apps to SOAP in the web service realm. When SOAP first hit, we all thought it was going to be the best thing since sliced bread. Object serialization interoperability between platforms and longer lasting light bulbs. SOAP didn't quite work out that way, did it? We developers started working with it and it didn't take long for us to realize how much it sucked. Then came REST. Finally. REST is much better: simpler, cleaner. Then JSON came along and helped us serialize our objects in a clear, elegant way, and (gasp), without XML.
It takes time to get things right. I see HTML 5 as a step along the way to cleaning up and simplifying web development, but just the first of many. But it's easy for me to sit here in my glass house and throw stones at standards working groups. It's not an easy job to mediate all the competing visions for what the web should be, for what web development should be. But unless we're forced to do something drastic by a sudden disappearance of the Flash player, we're content to let the working groups duke it out for a few more years. Our early adopter days are over.
What really confuses me in all this is Adobe's sudden rush to jettison Flex for a standard the WC3 hasn't even approved yet. Seems pretty rash. Most of the reasons developers picked Flex over AJAX in the first place haven't changed and HTML 5 won't change them much either. I think it comes down to a problem that's plagued a lot of companies in the business of making developer tools and Internet technology: their engineering teams produce something wonderful and useful, but the business folks can't figure out how to sell it. Adobe is scapegoating HTML 5 because it can't figure out how to make money off of Flex, even though lots of big players use it. Adobe had the same problem with Acrobat, the ubiquitous PDF. The PDF has changed the way we share and access "printable" documents on the web, but how many of us remember paying for the right to use it? And my beloved Sun invented Java -- and Java was undeniably a huge success in terms of developer and business adoption. But where is Sun, now? Gone. Absorbed into the pitiless borg that is Oracle, just like MySQL and Peoplesoft.
I guess we should be thankful that Larry Ellison has, as of yet, left Adobe alone. I'd rather see Flex go the Apache route than get sucked up into Oracle. Either way, Flex isn't going away any time soon, no matter what anyone says. It's way too useful.