Sunday 26 June 2011

HTML5 vs Flash.


One of, if not the, biggest debates on the internet right now is HTML5 vs Flash. Is Flash becoming obsolete? Can they work side-by-side?

What can Flash and HTML5 both do?
The answer to this is 95% of what HTML5 can do, Flash can do. One of the biggest arguments for Flash is it's video playing ecosystem. With most of the worlds video online using Flash player to show off videos, Flash is dominant at playing video. However, you can look at it another way. Most of the video is on YouTube - who are now topping 1.2 billion streams per day - is now owned by Google. And what Google have to say on how they want to embed video will shape the majority of the ways people embed video on the web. So what do Google think about HTML5? Well, the fact that their own browser is almost fully HTML5 capable says one thing, the fact they have built a website solely about HTML5 says another and maybe the final nail in the coffin would be YouTube's HTML5 player, already out for a good year now even if it is in beta.

Aside from this HTML5 also has the audio tag, so even those older Flash websites with weird choice for background music don't have very much to gloat about, even if we did mute that audio upon arrival.

Something most people use Flash for - games. Nearly all games on the internet use Flash, and fair enough, Flash does do a good job with gaming, even if it does run slow and can cause our browsers to crash. But wait a minute, HTML5 can also create and run games, without the use of plugins. Using something called Canvas you can create vectors and graphics within HTML directly using Javascript - another web standard. You can also then manipulate canvas with javascript - and as a side note, you can also manipulate video in HTML5 with javascript, and even get individual pixel colours - a great example can be found here

There are hundreds of things both Flash and HTML5 can both do so why don't they just work together, in harmony?

working side by side - link http://labs.codecomputerlove.com/FlashVsHtml5/ - game crashed (flash half) whilst writing this.

Working in harmony.
Both Flash and HTML5 can do similar things, however the main difference is one is a 'plugin' and the other is a 'standard'. A plugin is an 'extension' of the web - a term used very loosely, and a standard 'is' the web.

With that out of the way here is a great example of them both working together... Can you guess which side is HTML5 and which is Flash, there is basically no difference, but if you right click on the left hand side you can see which side Flash is actually on. Ironically, whilst writing this post, Flash on this website crashed and nearly crashed Chrome...


However, a big reason for converting to HTML5 and abandoning Flash may be because your website will be fully functioning on two of the worlds biggest internet communication innovations, rolls off the tongue doesn't it? By which of course I mean the iPhone and iPad. I'll come back to Apple later on though... But perhaps a bigger reason could be accessibility. the whole point of a website is to reach the mass market, there is no bigger market than the internet. However sometimes there are limits to how a user can view a page, and I don't screen size, more disabilities. Whether they are visual or audio or anything else, a user will want to be able to view a webpage with or without these disabilities.

Let's give an example. Say for instance, you were partially sighted and aren't able to read the text in a Flash website. Ah, but you own text-to-voice software, so we can just use that. Wrong. Flash text isn't actually text, it's just a rendered image which to us, we read as text. Now, if your text was within a website built with standards, then that would be a different - and much happier - story.


Flash = closed, licensed and uses specialist (overpriced) software


HTML5 = Open and free. Built by highly respected web standards. Can be written with the most basic text editor.


Flash must have some advantage over HTML5?
Flash was built by Adobe when there was no, or worse, alternatives to adding video or interactive content to a webpage. And understandably it became massive, allowing for this 'extension' - for want of a better word - to the web.

Flash can do full screen video. HTML5 cannot. Those are the basics, Flash can play video in a full screen environment as it just effectively creates a new window on your computer, which fills up the screen and is then overlayed. HTML5 cannot do this, mainly for security reasons, would you like to view a webpage then get stuck on a website which has uncontrollably forced itself to be the size of your screen?

An example of the best fullscreen can do in HTML5 can be found here: http://sublimevideo.net/demo

The only  other advantage of Flash over HTML5 could be animation. As Flash can be used to created amazing animations, but where webpages are concerned HTML5 has it trumped, with CSS3 animations and transforms.

Ok, so what can HTML5 do which Flash can't?
HTML5 has incredible new APIs built for web applications and websites. These include: WebSQL - a local database stored on the clients computer, Local Storage / Web Storage - permanent cookies, and Application Cache - for offline web applications, Geolocation - getting the location of a user, upon many other!

These great new technologies completely blow Flash out of the water and makes the fact HTML5 has a video tag look relatively minuscule.

*I urge you to look at these technologies!

What about Adobe
Adobe is a company, so naturally they are trying to keep Flash alive.
But if it is only for money reasons, I think that would be selfish to deny the internet a revolution in technologies as advanced as these.
Adobe own a whole suite of application like Photoshop and Illustrator not to mention many other massive application like Dreamweaver and InDesign, so maybe it's more maternal than business.

Either way, Adobe should do what Microsoft have recently decided to do with their 'Silverlight' - Flash alternative - by ditching it and start using web standards. Again, more on Microsoft later, but Adobe have a massive fan base of nostalgic fans of Flash, and a bigger fan base of web fanatics, so it seems to me, maybe Adobe's Flash sector can start making web standards better and add their own unique take on web standards  - maybe adding their vector knowledge to the Canvas API, possibly a 3D version of it.

Either way this change of technology won't be easy on Adobe, but will once it comes benefit everyone.
I say it indefinitely because I believe HTML5 technology which everyone is starting to back will  make Adobe 's Flash platform obsolete within the next 5 years.

HTML5 is in its final stages before it becomes the newest web standard, and within the next couple of years we will more than likely see that standardization, a couple of years after that, when the now HTML5 capable browsers will be more widely used, HTML5 will reign on Flash's parade.

Making the change
One small fact I found, when starting to learn Javascript, after a few years of Flash development myself, I found that as soon as I started to read tutorials and lessons, I saw that in fact Flash's Actionscript - it's core scripting language - is built on the same script type as Javascript. So why people would complain about this change of development is confusing to me.

Who is making the change?
As mentioned, Microsoft the worlds biggest technology company, have started to implement HTML5 and stop it's Silverlight platform can only push the HTML5 revolution.

And the more widely acknowledged Apple - the biggest company in the technology world for innovation and high quality technology - who after releasing the iPad started to push Flash off the top position in favour of web standards - with a whole section of their website devoted to web standards and a controversial - and rightly so - opinion on HTML5 and Flash - I really do recommend you read this statement by Steve Jobs.

Then there's Google who we have been over at the beginning of this post. But with Google on Microsoft's and Apple's side about web standards, and Google being the dominant online company, having quite a big part to say, I think Flash will definitely be something we will laugh at, like the floppy disk or even the almighty acorn computer.

Finally, I just want to sum up by summarizing the difference between Flash and HTML5.

Before computers could display images, we used ASCII Art. Now this has been thrown out for high resolution photos. Make of that what you will.

No comments:

Post a Comment