Do not compare HTML5 with Flash

date: 04 Feb, 2011, actionscript: HTML5, complexity: complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5complexity level 4.09 of 5, feedback (votes): users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)users score 5 of 5 (284 votes)

It has been a while since people started playing around with HTML5, and still nowadays there are some people that come with some comparisons between Flash and HTML5. I am a little bit tired about all this, and to be honest I am totally convinced that HTML5 and Flash are completely different solutions which make everything a bit pointless when comparing both, it is so clear to me what/when to use HTML5 or Flash.

HTML5 is not a threat against Flash

We all remember when Adobe came with Acrobat Reader ages ago, and we all remember people saying things like; this piece of software is not going to be here for long, this approach of showing and printing images and text is something that everybody is already doing and at the end it was all curious, how can a product like Acrobat be accepted in the market? What's my point? Where I am going to is… one single word "consistency". At the present the PDF format is considered as a standard for absolutely all kind of content distribution (and online printing). How can? The answer is so simple; everywhere it looks the same, it can be printed everywhere the same, we all trust on its consistency, so many of us feel the same with the SWF format.

People are confused about HTML5

Last week I got a quick discussion with a couple of developers, they came over to have some beers and ask me for any advice about the best way of doing things in HTML5, unfortunately my answer was; guys I am so sorry I didn't have the chance yet of making an iPhone application. So, they said; but we are not asking you about iPhone, it is more about HTML5 programming itself, and then I said; so why do you want to use HTML5 then? and at then end they couldn't answer my question properly. Basically they couldn't give me any good reason for making "complicated" things in HTML5. You can do with Flash (Action Script) whatever you want much faster than coding JavaScript indeed and considering that the Flash Player 10 propagation is quite high nowadays, so we don't need to be worried about relaying on this web based plug-in (the Flash Player).

HTML5 is here to stay, it is for us, and it is for helping us with that boring monkey job nobody wants to do like building a video player with a scroll slider progress bar and some navigation buttons, or making a basic photo gallery with enchanted options, etc. If you are trying to do something more complicated than that, I am afraid you have to be prepared to waste a lot of time dealing with very annoying things like cross browser inconsistencies, performance issues, plus you never know if that thing will work in new browsers in the future. The main problem of HTML is and will be always consistency; it looks different among browsers when you are dealing with advanced features, careful, it could be a big pain, keep it simple if you want to sleep well.

Errr, I would like to say that I am against people trying to make capture Forms in Flash using comboboxes, list, grids, etc… guys! For such things use HTML, in my personal opinion Flash has been created for satisfying our highest levels of creativity, making things intuitive, smart web apps. Additionally I would like to say that there is no reason for me making complicated things in HTML5, and if the reason you have is because of iPhone, you should look for a different solution, say Objective-C, C++. HTML5 is sitting on a very top level of the hardware architecture and processing work flow, JavaScript doesn't run as fast as you may need it in browsers, even slower in mobile devices, so, do not try to do complicated things with it, do not punish yourself.

A good comparison between HTML5 and Flash

A while a ago I wrote a very simple article speaking about Verlet physics, plus mixing it all with Spline Curves, it was about a Balloon movement algorithm, remember? Well here is the flash article in case you would like to have a go with it, Balloon Flash Version.

This time I tried to remake exactly the same piece of program in HTML5 so people can have a better understanding about it, using same logic, same work flow, and same algorithms. I did a quite big research about HTML5 before starting with it but unfortunately once I got it run, it couldn't reach the same performance of the Flash Version. I have tested it on different browsers, in the best scenario (using google Chrome) HTML5 runs about 4 times slower than Flash, I also tried running it iPhone4 and compared with HTC Desire, it runs in iPhone4 about 8 times slower than HTC Desire, of course HTC running it in Flash. I haven't tried it yet in iPad, do you have an iPad? Let me know how it runs like.

Here we are! same Balloon HTML5 version.

moving a balloon in HTML5

and the original version Balloon Flash version.

moving a balloon in Flash


Alex Nino -

date: 04 Feb 2011 - 14:05:17, published by Juho Vepsäläinen
You make some valid points. I agree that HTML5 isn't going to replace Flash fully (in short term, anyway). I have done pretty serious amount of HTML5 Canvas dev during the past year. In some ways it has been quite nice really. It is somewhat annoying to work around browser bugs and missing features, though. The Canvas API itself could use a bit more work. You also have to deal with a lot of details (optimizations!) a good API should be able to handle for you. Fortunately there are a bunch of intermediate libs that hide some of these flaws. I actually ended up implementing one myself (private for now :) ). I do think HTML5 in its entirety is a valuable addition to a developer's toolbox. I'm particularly excited by the prospect of proper browser HW acceleration (Chrome, FF, IE9). That should help a bit. :) Overall I suppose it's a good time to be a web dev. Lots of interesting things going on. :)