News for hackers. Stuff that matters.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by Wintamute on Wednesday October 02, 2013 @05:44AM (#6481523)
There's no real conceptual difference between a <canvas> element, a <video> element, a WebGL experience, a NaCl app or a Flash <object> on your webpage. They're all somewhat non-semantic, hard to search, rich media black boxes. So what's your particular beef with Flash, especially when rendered via HTML5? Or do you just hate all tools that enable creativity beyond a plain text website equally? Or did you just drink the Flash-should-die KoolAid without really thinking about it?
Re:HTML5 Flash Player (Shumway) lands in Mozilla by kapowaz on Wednesday October 02, 2013 @09:08AM (#6482127)
There may not be any conceptual difference, but there is a very significant difference in how these things you describe are used. Flash, when used badly, becomes a self-contained sandbox for the entire experience of a website. Besides security concerns, this approach is damaging to the overall experience of that site, since developers end up needing to re-implement native controls and functionality (scrollbars, form elements and keyboard navigation to name a few) in order to provide users with affordances they would otherwise take for granted. More often than not, the developer doesn't re-implement these features and so users are left with a sub-optimal experience (even if it is more ‘on brand’, or replete with gratuitous effects and animations). This is to say nothing for the accessibility implications.

Since the advent of smartphones and tablets that can't display Flash content, sites that do this have started to die out in favour of a combination of native applications and true HTML implementations. If the experience they're going for calls for a video or canvas element (3D or otherwise) then great, go for it. But the scope of that part of the experience is implicitly reduced, and so it doesn't result in a sub-par experience across the board (I might not be able to see your fancy WebGL 3D canvas effects, but the links to your ‘contact us’ page still work).

What I'm worried about is that by providing a compatibility path, Flash's imminent demise will be put on hold, and the sub-optimal experiences I described above see a resurgence. And that's not a good thing.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Recoil42 on Wednesday October 02, 2013 @12:07PM (#6483290)
>Flash, when used badly, becomes a self-contained sandbox for the entire experience of a website.

This same argument is true for Canvas, SVG, WebGL etc.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by kapowaz on Wednesday October 02, 2013 @02:22PM (#6484243)
This is true, but because of completely different toolchains it's very rarely the case that this happens. Flash, at its height, was being used with tools like Flex to build full applications. Adobe provided interface libraries for you to substitute native controls for its own (inferior) versions. Nothing like this exists yet for the tools you mention, and hopefully never will..
Re:HTML5 Flash Player (Shumway) lands in Mozilla by roarroar on Wednesday October 02, 2013 @09:12PM (#6486515)
And you think asm.js/WebGL will be any different? The more powerful the browser gets the more open to this kind of abuse it will be. Live with it.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by kapowaz on Thursday October 03, 2013 @07:48AM (#6488249)
Being open to abuse and being something that is commercially viable and desirable are totally different things. Yes, you can do all manner of nefarious things with native web technologies — as I understand it, this was one of the reasons it took so long for a native JS fullscreen API to be implemented, as it would open the door to spoofing the operating system's interface chrome.

But where these technologies differ is that Flash was marketed as a one-size-fits-all solution, that allowed designers and developers to work inside of a single framework. The barrier to entry is also very low: you can achieve a lot (relatively speaking) without much technical expertise — certainly when compared to how much effort it might be to do things the right way with native tech.

I don't ever see this happening with the likes of asm.js or WebGL because they're much more narrow in focus, plus they require very different (and non-trivial) skillsets to those of designers. As soon as an endeavour like this requires multiple developers and designers, it no longer appeals to your common or garden ‘chuck it over the wall’ marketing agency; the only ones that can afford to invest in this are the ones using the tools appropriately (or at least, most of them will be).

Re:HTML5 Flash Player (Shumway) lands in Mozilla by roarroar on Thursday October 03, 2013 @08:27AM (#6488394)
To say that asm.js and WebGL are "narrow in focus" is like saying x86 is "narrow in focus". They're general-purpose primitives that can be used for a wide variety of purposes. UDK, Unity, Gamemaker, Construct all export to HTML5. Flash has achieved a huge degree of success, so if it goes away maybe the next contender will be less damaging, but the mistake can be remade at any point, and with the power of asm.js/WebGL almost any framework can be ported.

People have always abandoned the pure, semantic HTML way as soon as the power has been there to do so. Sometimes this has been for good, sometimes for evil. You need to either turn it into a general purpose computing platform (Mozilla have been fighting this for a long time and finally lost) or leave it as a pure document browser (in other words, an application rather than a platform). But since people always want cooler, shinier things delivered faster, and the web provides fast, sort-of-safe delivery, there will be pressure from many places to start trying to eat up some of the native pie, which is how we got here in the first place.

The web people got everything wrong. They pushed a ton of waffly high-level rubbish trying to hang onto a restricted, comprehensible model, but in the end they had to cave and stick all the powerful stuff in anyway, and on a C-machine that means something like C (hence asm.js, which is a C compile target). And what we've ended up with is, frankly, pretty shit. The whole idea of nice, semantic HTML only works as a restricted application with no client-side programming facilities. Maybe in 30 years someone will have the sense to lift it out into the "user land" of the browser where it belongs.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by sp332 on Wednesday October 02, 2013 @09:34AM (#6482261)
Flash, when used badly, becomes a self-contained sandbox for the entire experience of a website.

But if it's rendered as part of the page instead of in a black-box plugin, doesn't that whole problem go away?

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Yaa101 on Wednesday October 02, 2013 @10:00AM (#6482389)
No, It's about what is inside the Flash that defines your experience with it.

For me the best trade-off is still to use a flash-block and grant the flash running time when I choose to do so.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by spongle on Wednesday October 02, 2013 @05:58AM (#6481557)
Yes there is.

You misunderstand.

My beef is with NaCl, objects, Applets and ActiveX etc as well, mainly because they run outside of the browser's engine, sandbox, security model and conceptual model. you also have to ship them externally to the browser.

Canvas, video, webgl fine.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by biot on Wednesday October 02, 2013 @06:15AM (#6481588)
From the fine article:

  "Shumway is an HTML5 technology experiment that explores
   building a faithful and efficient renderer for the SWF file
   format without native code assistance."
By your criteria, you should be fine with this.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by spongle on Wednesday October 02, 2013 @07:07AM (#6481740)
Well if it wasn't for the numer of turtles in the pile on the way down it'd be fine. This is a whole other layer on top...
Re:HTML5 Flash Player (Shumway) lands in Mozilla by riquito on Wednesday October 02, 2013 @06:48AM (#6481684)
You end up seeing a canvas, does it matter what application was used to draw it? (by the way I don't like Flash either for different reasons)
Re:HTML5 Flash Player (Shumway) lands in Mozilla by roarroar on Wednesday October 02, 2013 @07:05AM (#6481737)
What's so great about the "security model" of the browser? It's a patch work of horrible decisions.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by spongle on Wednesday October 02, 2013 @07:07AM (#6481744)
Nothing at all. It's shit.

But one security model is better than having two security models.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by captainmuon on Wednesday October 02, 2013 @07:42AM (#6481845)
If the components are sufficiently isolated, I'd much rather have many smaller components (with individual security models) than one monolithic system.

That's why e.g. the Unity3d plugin is so great. A complete 3D engine (with state of the art graphics, the ability to load almost any 3d format on earth, ...) does not belong into the browser. I don't want that code on my work PC.

OTOH, its great to have the ability to run games in the browser. The performance is much better than WebGL (because it contains compiled code, and because it is a complete, tuned, engine and not just an opengl implementation). And it's fairly safe, since it's built with Mono/.NET, you don't have problems with shellcode injection etc..

Re:HTML5 Flash Player (Shumway) lands in Mozilla by roarroar on Wednesday October 02, 2013 @04:54PM (#6485313)
So.. stay with the shit model forever? Good idea! NaCl is part of an effort to fix all this bullshit, and it's at least sort of going in the right direction.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by pietro on Wednesday October 02, 2013 @06:33AM (#6481645)
> Or do you just hate all tools that enable creativity beyond a plain text website equally?

That would be my stance. "Creativity" mostly translates to flashy adds, and while there are numerous examples of fun, engaging and useful Flash animations, they are vastly outnumbered by Flash banners, and the math is really simple: Blocking Flash is a huge net positive.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Tloewald on Wednesday October 02, 2013 @08:42AM (#6482036)
A video element is a video. It's as well or poorly handled as, say, an image. (The QuickTime / MP4 container actually allows standardized text tracks etc. so it's capable of being more semantically tractable than most other media formats in the long run.)

The other options are all, as you say, semantically impenetrable, but that's not all there is to it.

WebGL has the advantage of delivering very lightweight and efficient graphic effects, whereas even native Flash was horribly inefficient at doing what it did. NaCl likewise is intended to deliver near native performance to embedded functionality and isn't designed for a proprietary production front-end, better than Flash on both counts.

Canvas affords JavaScript the ability to natively generate graphics that would otherwise be impossible or very difficult. Flash is pretty horrible to talk to with Javascript.

So yes, other things are impenetrable, but Flash is impenetrable and lacks the virtues of those other things.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Wintamute on Wednesday October 02, 2013 @09:09AM (#6482132)
> WebGL has the advantage of delivering very lightweight and efficient graphic effects, whereas even native Flash was horribly inefficient at doing what it did.

Fundamentally incorrect. Flash is actually an incredibly efficient file format for rich media, especially at vector animation. Look it up, you can fit amazing animations into just a few kb. Nothing can beat it on the web today for that purpose, and the Flash IDE environment is unsurpassed as a toolchain for the creation of that sort of content. Of course you can abuse it, like any other tech, and pump too many large images, videos, sounds or whatever into a SWF.

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Tloewald on Wednesday October 02, 2013 @10:00AM (#6482390)
Flash's file format is fine w.r.t. compression. (It's beastly to parse, but that's a consequence of history.)

It does a terrible job of rendering graphics though (probably because the guys who wrote the lowest level parts of the engine did so a long time ago and have moved on). When Steve Jobs wrote his letter about Flash a big part of the deal was Flash's impact on battery life because it was so inefficient -- and Adobe struggled to fix this for years and then gave up.

I remember back when some Adobe blogger published a comparison of Flash to canvas animations showing Flash to be significantly faster. I, and several others, posted trivially optimized versions of the canvas code that crushed Flash like a bug, and this was Flash at the end of a long period of optimization where it carefully draws only the regions of the screen that changed, versus a pretty naive canvas implementation pretty much double-buffering its animation.

http://loewald.com/blog/?p=3362

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Smily on Wednesday October 02, 2013 @04:49PM (#6485274)
A single bouncing circle on a rectangle doesn't count as a benchmark in my opinion. Flash can be written in a performant manner, it used to be faster than HTML for almost everything, but that gap has narrowed for some specific things.

Most of all though, in my experience, Flash is usually more consistent across browsers and operating systems. Even if it's slower than the fastest browser, it's at least consistently slower.

When dealing with the desktop and/or applications on mobile devices that support AIR (i.e. supported runtimes), graphics rendering isn't an issue anymore. If you are really stuck with poor graphics performance using the traditional methods, you can just leverage Stage3D, which is just like WebGL, except it has a compatibility layer and is constrained in some ways, which can potentially make it more compatible with different underlying architectures and across more GPUs.

Going back to benchmarks though, I believe that 95% (pulled out of my behindus) of benchmarks have poorly written code / code that could be optimized to run an order of magnitude faster, so I won't engage in a benchmark fling-fest. I can at least link a few minor tests I made a while ago where I encountered the above mentioned inconsistency issues:

https://docs.google.com/spreadsheet/ccc?key=0Av4YDog3VfA-dHI...

Re:HTML5 Flash Player (Shumway) lands in Mozilla by Tloewald on Thursday October 03, 2013 @03:24PM (#6491292)
My favorite example of a Flash website was Adobe's store, which was 100% Flash for quite some time and virtually unusable (in different ways!) on every platform.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by willvarfar on Wednesday October 02, 2013 @11:13AM (#6482870)
Fun unsubstantiated anecdote; when working for Symbian we unofficially optimised their then-new renderer for generic 2x speedups. But this was just weeks before the death of UIQ and that went nowhere...
Re:HTML5 Flash Player (Shumway) lands in Mozilla by mohawk on Wednesday October 02, 2013 @05:57AM (#6481554)
I can tell you what my problem is with flash: the reference implementation by Adobe stinks.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by Bjoern on Wednesday October 02, 2013 @06:16AM (#6481589)
Draining excessively my CPU and Memory for no good reason, being insecure, etc.
Re:HTML5 Flash Player (Shumway) lands in Mozilla by captainmuon on Wednesday October 02, 2013 @07:35AM (#6481821)
I suspect this will not use less memory and CPU than a native plugin.