HTML 5 Versus Flash/Flex

There's been some chatter lately about how the next version of HTML 5 might make Flash irrelevant. And not only Flash, but also Adobe Flex, Microsoft Silverlight, and Oracle JavaFX might similarly become useless.

This is because the latest version of HTML has a lot of features that were previously confined to advanced animation plug-ins... the three I like the most are:

  • The <audio> and <video> elements, which allow for embedding rich media directly into the browser; the #1 use case of Flash.
  • The <canvas> element, which allows for images and vector-graphics to be directly rendered with JavaScript, which allows simple animations; the #2 use case of Flash.
  • Offline data storage so your users can keep a 5Mb database offline, manipulate data, and re-sync the data later; an uncommon use case, but vital for rich internet application that you can use on an airplane.

These features have been necessary for a long time... and even though HTML 5 is not yet a finished standard, most of it is already supported in major browsers: Firefox 3, Internet Explorer 8, and Safari 4. This means that you can create a HTML 5 application right now! Probably the most famous HTML 5 application out there is Google Wave for email, which we are all just dying to try out!

I feel that this kind of competition will be healthy... I'd wager that 90% of what people currently use Flash for could just as easily be done in HTML 5. Also, by being standards compliant, you'll have fewer concerns about vendor lock-in. What happens if Adobe gets into trouble, then is bought out by Computer Associates? No more Flash for you!

However, there is still a problem... currently HTML 5 compliant browsers are only 60% of the market... I know quite a few enterprises that are still on IE 6, fer crying out loud... Flash has the distinct advantage of working on older browsers, and has about a 95% market penetration. Although, last year at this time only 5% of users had a HTML 5 compliant browser, so maybe by May 2010 HTML 5 will be as popular as Flash?

Hard to say...

This question came up recently in the content management universe... a few weeks back EMC/Documentum unveiled their latest UI at the Gartner conference on Portals and Collaboration... and it was a pretty slick Flex-based UI. A daring move... However, slick UIs don't need Flex. Billy and I got a demo from Jason Bright about Media Beacon's latest app. It was very flashy, and uses pure HTML, CSS, and JavaScript. As Jason told CMS Watch:

"Flex, like ActiveX, Silverlight, and Java Applets before them are, in a sense, replacements to the browser. Each replaces the web browser in a proprietary way. While I love Flex as a technology, I do not think it is a good strategic decision to throw out the traditional browser for a new client-server model no matter how attractive"

The problem boils down to this: there are millions of people dedicated to making the web better; but only one small part of Adobe is dedicated to making Flash better. The same holds true for Silverlight and JavaFX.

If I were writing a one-off rich internet application, I might choose something like Flex, because Flex development time is half what it would be for a similar HTML/CSS/JavaScript app. There are so many browser bugs, and oddities in JavaScript, that its always a long slog to debug it. With the possible exception of the Google Web Toolkit, there really are no good ways to easily design a flashy HTML/CSS/JavaScript application... whereas designing application with Flex is relatively simple.

But... if I were making an application for resell, or one that I intended to have other people maintain, I'd be more hesitant to use anything but web standards. HTML 5 is right around the corner; product development cycles are long; and HTML 5 browsers could reach 90% market saturation in 12 months.

All things considered, the best option now is HTML 5...

Update: in case you have been living in a cave, and missed the launch of Apple's new iPad, you might have missed the fact that the iPad will not support Flash or Flex. I'm uncertain whether this new device will really take the world by storm, but if it does, it will be one more reason to switch to an HTML 5 code base.

Comments

How about jQuery?

Nice post. One comment though: "There are so many browser bugs, and oddities in JavaScript, that its always a long slog to debug it"

What about jQuery? It's supposed to remove the browser oddities by programming using one API.

Millions vs a small part

"There are millions of people dedicated to making the web better; but only one small part of Adobe is dedicated to making Flash better."

I don't think that's so. There's a wider and more diverse ecology around the total Flash platform than around the total "HTML5" ecology -- many, many, many businesses are based atop using the capabilities available to nearly all browsers today.

And within Adobe there's a united emphasis in working atop Flash: the new Text Layout Framework came through the InDesign research groups... the video and metadata teams have been leading the way on automated captioning and text search within Flash video... acrobat.com and LiveCycle are developing other aspects of the Flash Platform. This is larger and more cohesive than what the companies behind each different HTML runtime are doing.

... but, as usual, the world will judge a technology by its results, and what it actually offers. :)

John Dowdell
(employed by Adobe)
http://blogs.adobe.com/jd

Integration?

In all the of the debates I see people are making a case for HTML 5 or Flash/Flex they all failed to consider one thing: integration

Neither HTML 5 nor Flash/Flex will ever be able to integrate at the level Silverlight will. The real case for Silverlight is its integration model (WCF on the server and Silverlight on the client). Microsoft will push Silverlight into its core products including SharePoint, ASP.NET, Windows Mobile 7, and the biggest bets of all its cloud OS, Windows Azure. I think Silverlight is here to stay regardless of what happens to HTML 5 or Flash/Flex.

Re: Integration?

The real case for Silverlight is its integration model

And that's exactly why a lot of people say that Silverlight is a replacement for ASP.NET, and not really a replacement for Flash or HTML5. If you choose Microsoft as your dev platform, and you have a captive audience, then Silverlight makes a lot of sense... but you might also need to add Flash/HTML5 widgets as well.

Re: Millions vs a small part

You are correct that Flash has a thriving community and a large ecology of add-on functionality, whereas HTML5 right now has pretty sparse support.

However... that all grew after Flash gained a large browser market share... Right now, there is nobody "pushing" HTML5 other than geeks. But, once HTML 5 has a killer-app that everybody wants -- like Google Wave -- then that could trigger the same kind of thriving community.

I'm just sayin... if I were making a killer web app that wouldn't be finished for a year, I'd probably pick HTML5 over Flash.

Re: How about jQuery?

I like jQuery, but I usually recommend the Yahoo User Interface (YUI) library to enterprise customers. Its a bit easier for clients to swallow a library backed by Yahoo, then from a handful of "dudes" who might find something better to do next week ;-)

Also, once HTML5 is popular, I'm sure libraries like jQuery and YUI will take advantage of the extra features... You'll probably still use the same function calls, they will just look a LOT cooler.

leef

On the surface your statement sounds great; "The problem boils down to this: there are millions of people dedicated to making the web better; but only one small part of Adobe is dedicated to making Flash better".

But then why has Flash been vastly superior in contrast to HTML, and even AJAX, for so long? You're in a sense saying that a group of guys have been far outpacing the mob? Delivering audio/video/3D/complex animation/file-reference-uploads/and so much more, and the "millions of people dedicated to HTML are just now nearing agreement on audio/video element attributes? Will that element have a computeSpectrum method? Web 2.0 was bubbling with the concepts of "cloud computing", "online OS", and RIAs, and the Flash Player has been the closest reality to a programming platform to deliver apps that rival photoshop. A Flash App was touting the new bitmap smart-scaling technology before Photoshop itself. Flash Player 10 is entirely more comparable to Cocoa than HTML/DOM scripting. And best of all the Flash Player elegantly side-steps the tremendously ridiculous render/display differences between the multitude of browsers. The best thing about HTML5 is that it may continue to convince Adobe to further open-source the Flash platform. If that were ever to occur I'd be surprised to see an HTML 6. Flex is adapting the niceties of element tags, but As a developer I'll always choose rendering consistency, and sprites over browser-display-differences and divs.

Re: leef

"But then why has Flash been vastly superior in contrast to HTML, and even AJAX, for so long?"

Web standards take much longer than they need to... mainly because the process is so political and bureaucratic. However, that hasn't prevented Microsoft, Netscape, Mozilla, and Apple from making additions to the standards that later became standards.

That whole AJAX/XmlHttp thing? Invented by Microsoft. WebKit? Apple. But each one was an attempt to add one small thing that made a big difference to the web. Flash is a BIG THING that makes a medium difference. It will still be useful and cool and will probably always have something of a niche... and maybe Adobe will come up with some insane innovation that will drive the HTML6 standards 10 years from now.

Who knows?

All I know for certain, is that once the enterprises ditch IE 6, they might jump to IE 8. Then the market penetration of HTML5 browsers will be as high as the ones using Flash... at which point it makes the most sense to use the open standard, unless you 100% need Flash.

leef

"Web standards take much longer than they need to"

Amen! You're opinion that using HTML5, when it has the same market-penetration as Flash, makes more sense doesn't make sense to me. Your 'what if Adobe tanks' statement is a valid concern, but one that is shared in similar ways by open-source tools/languages. Proprietary software runs the same risk of being deprecated, or mishandled by new management, as does open-source software.

"But each one (Webkit, Ajax, XHTML) was an attempt to add one small thing that made a big difference to the web. Flash is a BIG THING that makes a medium difference."

That's opinion. How did you measure the impact?

Anyhow, HTML is great, I'm glad to see it's advances. It is the browsers display inconsistencies I have real issues with. I'd be happy to see a one browser world, or one where any browser deviating from display-standards is fined, sued, and flogged by an international jury of disgruntled web design/developers = ] I also look forward to the day when the Flash Player is open-sourced, and becomes an integral piece of the browser's rendering engine, not just a plugin. It's a small world afterall, and we are the people.

I would gladly take you up on the wager...

"I'd wager that 90% of what people currently use Flash for could just as easily be done in HTML 5"

1. If you knew how to code in ActionScript3 and use the Flex 4 libraries you would not make that statement because you would know that what takes sometimes 60 lines in .js or xhtml can sometimes take 4 lines in Actionscript and/or MXML

2. Most javascript "programmers" do nothing but IMPLEMENT pre made modules. Unless they start learning how to program them - html 5 has a LONG way to go.

3. Wave could have been built with Flash about three or four years ago. Flash has had persistent cookies, messaging, remoting, real time shared objects etc.. for years and by the time html 5 is ready for prime time...Flash and Silverlight's tools will have evolved far past HTML.

4. How fun is it building something for months...only to find out it will work in 10% of browsers instead of 99% of computers?

I wish you all luck...

Silverlight Integration

Silverlight has a great integration story with MS core products, but it has much more than that. Silverlight does not require the use of MS products beyond the client, indeed it can be served from any server and communicate with other servers and the tooling is very good. Microsoft's presentation layer technologies have always been 1st rate and compilable. Flex is also a good platform and the two will live on and compete with HTML 5. As an architect, prematurely advising clients to take the HTML 5 path seems unsupportable at this time.

Re: Silverlight Integration

Silverlight is nice, but its more of a replacement for ASP.NET; not a replacement for Flash/Flex.

As an architect, prematurely advising clients to take the HTML 5 path seems unsupportable at this time

I'm using my developer hat, not my architect hat. If this were a one-off solution, I'd advise Flash/Flex, or one of the popular JavaScript toolkits. If I were writing an application for resale -- where your app might not be released for 12 months, and might not be popular for 24 -- then I say the time is right to bet on HTML5.

"1. If you knew how to code in AS3 and use Flex 4..."

amen, brother. amen...

I was thinking the same thing while reading this.

(btw, either the CAPTCHA's on this site are too hard, or I need to enroll in some type of CAPTCHA class... I hate always trying to prove I'm human)

Windows Only: will never be a real standard

Until Silverlight becomes truly cross platform, and not just Windows (and maybe Mac), then it'll never be a standard. Too many Internet connected devices (Netbooks, Cellular Phones, Set Top Boxes, the workstations of a large proportion of software developers) have support for HTML5 and will have support for flash over the next year or so for Silverlight to succeed unless Microsoft starts a big push to diversify the player.

Re: How about jQuery?

jQuery is the only open source javascript framework shipped with the Microsoft stack. That should make it easier to swallow.

jQuery/Yahoo

Is Yahoo really that different from those jQuery "dudes"?

It doesn't seem the most stable to me. It is constantly entertaining deals and offers and the talent pool seems to be a revolving door lately.

re: jQuery/Yahoo

Which one doesn't seem stable? jQuery or Yahoo?

Well, reading articles like

Well, reading articles like these make me wonder if the writers really know why Flash is so widely used and what it is used for and why HTML 5 is something serious Flash developers do not take serious at all, simply because it can't do what Flash can.
First of all, one of the best and most popular uses of Flash is ANIMATION and second, MULTIPLAYER GAMES. No, you can't make Joe Cartoon with HTML 5 and NO, HTML 5 is not suitable for creating huge complex online games like HABBO HOTEL. Creating stuff like that with HTML 5 is simply impossible. And if you're gonna try it anyway, the result will be way slower and bigger than it's counterparts made with Flash. WHY? Because the SWF-format is a compressed format. Creating vectorimages with the buggy SVG result in filesizes 4 / 5 times bigger than if you would save the file as SWF... So if you really think HTML 5 will make the web faster, think again. As a matter of fact, it won't. Slow websites made with Flash are not slow due to Flash, but due to bad programming. That's something HTML 5 will not change at all.

"The problem boils down to

"The problem boils down to this: there are millions of people dedicated to making the web better; but only one small part of Adobe is dedicated to making Flash better."

And yet, HTML is JUST getting around to being able to play a simple video, something Flash has had for nearly a decade now. How about Fullscreen? Closed-caption support? Streaming video? 3-D? Bitmap manipulation? Sound spectrum? etc...

tradeoffs, boys... its about tradeoffs

I fully agree that Flash/Flex will always have features that HTML5 will not have. However, focusing on that misses the point.

I'm talking about creating a next-generation web application. If I were to do that, what technology should I choose? Should I pick HTML5 which is a standard and gives me 90% of what I need... or should I standardize on a 10-year-old proprietary toolkit that still gives people the heebie jeebies because of it's closed nature? Also... neither the iPod nor the new iPad support Flash, and probably never will... but they do support HTML5.

For my money, HTML5 is the future. Flash will probably still have a place, but Flex probably won't.

I wouldn't be too quick to jump on the Apple bandwagon...

Yes, the iPhone and iPad don't support Flash, but that is by design. Jobs is being pretty public about his dislike of Flash, and while he can sugar coat it and say it's because it's unstable, I would venture that it's more likely because Flash is not something he can control.

One need only look at the iTunes DRM and the App store to see that Apple doesn't have much interest in nonproprietary development, and I believe one of the main reasons they are backing html5 over Flash is because they can at least exert a small amount of control over the development of html5. For instance Canvas was originally developed by Apple and at it's inception they patented it and had planned to license it.

Now i'm not going to say that the days of the plugin aren't numbered, because they are, eventually open standards have a way of winning. However I don't see the end of plugin architecture for a while. That leaves a lot of time for Adobe to improve on Flash and if Adobe ever really did feel backed into a corner they could always make Flash open source.

While the concern of "what if Adobe goes under" is valid, lets not forget that just a few years ago Flash was Macromedias baby and Adobe seems to have done pretty well with it sense its acquisition. Generally when a company buys another they don't abandon major revenue generating platforms.

I am excited for the new html5 spec, but like everyone else here my biggest concerns are support and rendering. At this point in time my clients prefer not to pay for hours of extra work debugging on multiple platforms (though jquery et al are god sends they are not perfect). Flash/AS is still a viable platform, and will continue to be for a while, though a little competition never hurts the consumer.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This form prevents comments spam...