Monday, November 29, 2010

Will HTML5 Replace Flash?

How It All Started


For the past several years, Adobe Flash Player has been controlling over the Internet multimedia platform market, being used in various fields such as media players, games, animations, and various other interactive rich contents. Flash-based advertisements flourish everywhere. If bored, anyone can simply launch his or her favorite Internet browser and visit one of dozens of sites that host thousands of Flash-based games. Most of the major websites greet you with fancy Flash animation intro. Popular video hosting sites such as YouTube or Vimeo heavily rely on Flash technology. Even though a number of other competitors like Sun’s Java applet or Microsoft’s Silverlight can imitate some of what Flash can achiever, they weren’t able to bring down the massive popularity of Flash. Naturally, there rose worries about whether we should continue relying on a single Corporation for a large portion of web experience.


The issue has gathered much more attention since Apple’s release of iPad in the early 2010. Just like iPhone, iPad didn’t support Flash for its built-in Safari browser, making a number of major websites hard to browse through. Even during the official demonstration, people could see the blue “missing plug-in” icons in place of the flash contents. In response to the questions about iPad’s not supporting Flash, Steve Jobs publicly confirmed Apple’s position against Flash.

On a recent trip to New York to woo newspaper publishers with demonstrations of the iPad, Steve Jobs met with staff of the Wall Street Journal. During the demo, editors asked about the iPad's lack of Flash support, to which Jobs replied, "We don't spend a lot of energy on old technology." … He reportedly told WSJ staff that Flash is buggy and crashes Macs, is a "CPU hog," and a source of "security holes." He also referred to Flash as dying technology, likening not supporting Flash on the iPad to Apple dropping support for floppy drives, ditching legacy data ports, and replacing CCFL backlighting with LEDs. [1]

On the contrary, Apple demonstrated its strong support for HTML5 and CSS3, the next version of the web standard that is currently under development.

Every new Apple mobile device and every new Mac — along with the latest version of Apple’s Safari web browser — supports web standards including HTML5, CSS3, and JavaScript. These web standards are open, reliable, highly secure, and efficient. They allow web designers and developers to create advanced graphics, typography, animations, and transitions. Standards aren’t add-ons to the web. They are the web. And you can start using them today. [2]

This gathered people’s interest to see whether the upcoming web standard will be capable of replacing Flash in the web application world. One of the biggest advantages of HTML5 over Flash is that it has potential to run more efficiently than Flash does since HTML5 is supported in default by the browsers, instead of being plugin-based like Flash.



What’s So Good About HTML5


Unlike its previous versions, HTML5 comes with very handy media tags [video] and [audio]. These tags let the developers place media contents on their pages in the same way as using the familiar [img] tag, without having to worry about dealing with codec issues, since the browsers will do all the work. Unlike Flash, embedding media contents via HTML5 will be much easier to maintain and customize, since we don’t have to wait until, say, Adobe fixes bugs on its latest Flash plugin for a particular browser, and we also don’t have to completely rewrite our codes to come up with some of Flash’s major upgrades. (e.g. Upgrade from Actionscript 2 to Actionscript 3) Recently, major video hosting sites such as YouTube, DailyMotion, and Vimeo have been experimenting to wipe off Flash and port their services to pure HTML5, CSS3, and Javascript. This way, they will attract broader range of audiences, because mobile users, especially iPhone and iPad users, will be able to simply launch built-in browsers to enjoy watching videos, instead of having to wait for Adobe to upgrade or release appropriate plugins for their mobile devices.


In addition to [video] and [audio] tags, HTML5 also provides [canvas] tag, which enables developers to place a 2D area and freely draw in it using Javascript. This is a great tool when it comes to displaying simple dynamic graphic contents because being a browser standard instead of a plugin like Flash or Java, it doesn’t force users to suffer from any start-up delay, waste of memory or CPU usage. Furthermore, since it is a browser standard, the actual performance of [canvas] depends on how a browser implements it. This is a good thing, because it fosters competition among the major browsers such as Google Chrome, Safari, Mozilla Firefox, or Opera. Browser developers will keep pushing to implement [canvas] to perform as efficiently and as fast as possible.


Also, a number of other built-in features like drag-and-drop make it much easier to develop rich web applications without additional plug-ins or any complicated code hacks. Finally, since HTML5 is free and open, one can go right away developing HTML5 applications without having to pay any cash, whereas in order to develop in Flash, one needs to purchase Adobe Flash Professional CS5.



The Controversy


So, is HTML5 actually better than Flash or not? Fierce debate on this is still undergoing on the major online forums. Countless hours have been spent gathering benchmark statistics, and in the popular online communities, even the slightest mention of comparison between them has led to a huge controversy. Among those clashes, there are a couple of interesting ones that are worth mentioning here.


One day, a Flash developer posted on his blog a fancy, smoothly animating button he made with Flash in 2004, and challenged HTML5 supporters worldwide to make a button purely with HTML5 that looks and behaves exactly the same as the one he posted. He added that if they succeeded, he would eat his old Flash software disks. [3] The blog post got quickly spread throughout the Internet. Several hours later, some HTML5 experts managed to create buttons that behave very similar to the Flash button. It is not yet known whether he actually ate those disks. However, considering that Flash already could create that kind of buttons six years ago, it is a little troublesome to conclude from this whether HTML5 will be able to replace Flash.


Meanwhile, a web programmer was interested in “literally” comparing the performances of Flash with HTML5. He ended up creating a Pong game, where the left half of the board is rendered using Flash and the right half is built with HTML5. [4] He published the game to let the users play it themselves and decide which half runs smoothly and which half doesn’t.


What about the actual performance in general? Contrary to the popular expectations, Flash outperformed HTML5 in most of the recent graphic benchmarks in Windows, Mac OS, and mobile devices. [5] Furthermore, since HTML5 doesn’t support Digital Rights Management, it is hard to prevent protected videos from being available to download with simple “right-click and save.” A post in Hulu blog states its difficulty to fully switching to HTML5:

We continue to monitor developments on HTML5, but as of now it doesn’t yet meet all of our customers’ needs. Our player doesn’t just simply stream video, it must also secure the content, handle reporting for our advertisers, render the video using a high performance codec to ensure premium visual quality, communicate back with the server to determine how long to buffer and what bitrate to stream, and dozens of other things that aren’t necessarily visible to the end user. [6]

Because of this, browsers will have to solve DRM issue in order to fully support HTML5. Another obstacle is that h.264, one of the widely used video codecs supported by HTML5, is proprietary. Irony rises: browsers must pay a huge amount of money to use this codec in order to fully support HTML5, which is free.



Conclusion


Again, however, it is a little too premature to conclude that HTML5 will never be able to beat Flash. HTML5 is still under its beta stage. Browsers are only partially supporting it for now, and optimizations are hardly complete yet. Also, even if such problems as DRM issues become resolved for the major browsers, we can’t say we are fully drawn to the new web standards until most of the people get to upgrade their browsers to those that support HTML5, which won’t be anytime soon, considering that still a large portion of them are using an outdated version of Internet Explorer. No need to hurry; we should just sit back and watch how this web revolution gradually infiltrates into our web, slowly making its way to bring us to the world of rich web applications without having to rely heavily on laggy, crashy external plug-ins.


No comments:

Post a Comment