views:

258

answers:

5

I have read a few articles, I can't see why one would use html5 instead of flash so any few examples which could show the advantages ?

A: 

html5 provides the video tag, which if combined with an opensource licensed codec allows any user with a modern browser to watch the video, even if their platform doesn't support flash.

Mex
There is more support for flash than html5. (IE8 doesn't support html5 :/)
M28
@M28 - There are also more gaping security holes supported by flash than html5 :)
Nick Craver
Like what? :)­ ­­
M28
+8  A: 

HTML5-based pages will work on the iPhone and IPad. Flash will not. Right now, Flash is supported more broadly that HTML5 except on Apple's mobile platform. HTML5 support is rapidly becoming ubiquitous so it is certainly a reasonable choice even for non-mobile focused sites. If you choose HTML5, you may want to implement graceful fall back for clients that do not implement any or all of the HTML5 features you use.

Tom Cabanski
How can something become *more* ubiquitous? Is this like giving 110%?
MusiGenesis
Geez MusiGenesis. You sound exactly like Sister Methodia did back in Catholic school. Anyway, my answer has been edited to be less ubiquitous ;-)
Tom Cabanski
How about "HTML5 support is rapidly ubiquitizing"?
MusiGenesis
I'm surprised Flash isn't supported by Iphone, is Apple preventing Adobe to do so ?
@asksuperu - Yes, Apple blocks all 3rd party runtimes as a matter of policy. So Flash, Java, Silverlight, etc, are all blocked from iPhones.
fenomas
+1  A: 

The biggest draw is that you can do things in the browser without any plug-ins that you used to have Flash to play. This means browsers, OS's, and devices with poor (or no) Flash support can suddenly have a richer media environment.

j0rd4n
+17  A: 

HTML5 isn't one big blob that, taken as a whole, obsoletes Flash. It's lots of independent developments that browser vendors have been working on, some of which will allow native-HTML browsers to do things that have previously been limited to plugins such as Flash.

  • The famous one of these is audio/video. Flash was designed for animation and games, but in recent years since Flash added FLV playback, video has become by far the more prevalent use case for Flash (replacing embedded media players, which were always really horrible — good riddance to them). When browsers can do video by themselves, that will take a big bite out of Flash on the web.

  • Another important feature is <canvas>. This expands the possibilities for games and other simple animations and pixel-level user interaction. Obviously it is far from offering all that Flash can do in the 2D realm, but again, it'll take a bite out of Flash's traditional use cases by offering similar features in an easier-to-deploy environment.

There are also features which browser vendors are implementing that are not actually part of HTML5, but which are seen as part of the same future-browser platform. For example:

  • ECMAScript Fifth Edition. JavaScript, now 10% less rubbish!

  • WebSockets. Faster than XMLHttpRequest, more reliable than Flash sockets.

  • SVG. This has long existed, but without IE support and with relatively poor performance for animations in many browsers. IE9 brings SVG support and promises to make it fast, potentially kicking the other browsers into optimisation action. SVG could offer rich retained-mode graphics in a similar vein to Flash, but with much smoother integration into the web page (instead of being stuck in a box).

  • CSS3 font embedding and effects will reduce the need for Flash text-replacement hacks.

  • Potentially, in the future, WebGL or similar for 3D.

and so on. Does all this, taken together, obsolete Flash? No. Not even when most deployed browsers support it all (and that'll be a long time yet). But it doesn't leave very much that only Flash can do.

IMO: in the future Flash will remain popular for drawn animation (thanks to its authoring environment) and games. But in five years it will no longer be what it is today: an essential, integral part of the web.

bobince
Websockets seems interesting. I'm also interested by Canvas. Thanks.
+1 for the IMO. Exactly what I'm thinking, yes Flash may eat 40% of my CPU when playing a Youtube Video under Ubuntu, but guess what? The latest Chrome Beta eats a whopping 100% when playing a video... as long as this isn't down to something like the 10% a native players users, I don't see the video tag as an improvement at all. Performance DOES matter when it's about battery life.
Ivo Wetzel
Wouldn't the fact that JavaScript source code is openly available be a problem? Especially for games which need to submit scores etc to the server? I know flash can also be decompiled and JavaScript can be obfuscated, but it's far easier to protect Flash code than it is to project JavaScript code.
Evans
I don't think it really counts as ‘protection’; as you say, there are many ActionScript bytecode decompilers out there and their output is likely to be about the same level of unreadability as de-obfuscated JS. Either way doesn't work in the end, as the high score tables of any client-side-based Flash game will show.
bobince
A: 

The biggest use case for HTML5 over Flash in my books is avoiding the whole vendor lock-in problem. If you use Flash you're at the mercy of Adobe and Adobe's licensing policies, etc. They may be sane now, but they may also change from under your feet tomorrow. (Ask iPod/iPhone/iPad developers what that feels like!) HTML5 is a standard and as long as you adhere to it you're not beholden to a single vendor for your livelihood (in theory).

JUST MY correct OPINION