Well, maybe you weren't aware, but Flash is bad. Actually, it's worth than that, it's evil. Pure, unaltered, total evil. :-)
Indeed, it's so totally ultimately evil that you can't even spell the name if you're drinking a beer with some friends. Saying the name to them, in a context that doesn't fit the "wooo, Flash is really bad" stanza, will make them go through (beer) agony almost immediately.
Technically, you feel like the Knights who say Ni, err who say Fluuush!
In a period during which the web is moving fast, and browser makers go through extreme efforts to make html suck less, it's probably a good time to look deeper into that.
Flash is bad, from the horse's mouth
Trying to dig a bit deeper with the Flash-hater-crowd will let some arguments emerge. Let's examine these.
The Flash runtime/platform is not open-source! That is unforgivable!
That's true. Well. Partly true at least.
Partly, because Adobe did open-source parts of its platform (remember Tamarin?), and has an open-source Flex SDK.
Still true, because the flash player definitely is close-source.
While I certainly respect this argument from people who are using exclusively open-source softwares, I find it somewhat disturbing from people who don't. Technically, if you are on anything but Linux/(free/open)BSD (save the exotic ducks...), your whole operating system is not open-source. Anyone with an iPhone around? Or a Mac? Or a... Windows? Start fighting that one first, mate! ;-)
In a more subtle way, anyone using the google search engine do rely on close-source softwares (and who doesn't?) and doesn't have any alternative (bing? seriously?). Or twitter. Or flickr. Or lastfm. Or (almost) any major web-based application (linkedin? facebook? spotify?).
With the advent of a new era in computing where applications are leaving the desktop and going to the cloud, there is a strong paradigm shift and new challenges for open-source proponents (<- count myself into these) to adapt to an entirely different situation where we are no longer simply speaking about running a close/open-source binary locally.
Back to the point: Opera is not usually resented as evil... but wait... they are close-source right? Exactly.
So maybe the fact that the flash-player running locally is close-source is kind of a moot argument somehow, don't you think?
Flash applications are not open-source!
Flash applications are as much open-source as their creators want them to be. There are plenty of open-source flash projects. So, that one really doesn't stand.
Flash applications, even open-source, are un-trust-able binary blobs that will get executed by an untrusted runtime on my computer!
Well, get some sleep tiger. :-)
A flash applet is not native code, it's p-code. And if you really want to take a look at the source, it's that easy (cough, sothink, cough trillix, cough, google, cough). Yeah, you heard it. You can get the full-source code of a flash application if you want (and I sure do :-)).
Now, let's get back to the previous example. Imagine you are surfing using Opera (or any other closed-source web-browser). And you go to gmail. Please take a look at the attachment to this post. This is a part of the gmail application. Yeah. Where exactly is that anywhere near open-source, hackable-web, open-web, or a trust-able application?
This indeed is something much closer to a binary blob than most flash applications, and that will get executed on your computer by a javascript-engine runtime you can't trust. And even if you think you can trust your runtime (say, Firefox), how does that change the situation that it's impossible to audit gmail client code? (yet again, I'm not even speaking about the server side)
And oh, did I mentioned it? Gmail uses flash. Yeah. Right click on the text to attach a file to your mail.
Still, google is not resented (as evil) for doing that kind of crap... software :-)
Why is that? Well, maybe because that's not really the problem either :-) At least it seems that this specific problem doesn't prevent people from using and applauding other applications suffering from the same "weakness" ;)
Flash and Flash applications are not "open-web"
I certainly think about myself as an open-web supporter. Now, depending on who uses it, the Open-Web concept may take just about every meaning, from "Open-Source", to "Standard", to "Woo, cool, Mozilla implemented it! It's Open-Web!" :-).
Informally, trying to melt all the different opinions about what the Open-Web is sums-up to: the Open-Web approach tries to make emerging technologies (possibly radically different, or at least divergent) play well with each other.
Conversely, a close-web approach/technology would rather state "f*** you all, I'm better than you and will replace you anyhow".
So, is there anything intrinsically close-web with flash?
Nope.
You can (and you should) write flash applications that integrate seamlessly in the document, that expose a javascript API on the object node, and that play well with the embedding document and the other technologies involved.
You can (and you should) do your SEO work in your flash applications (and google is doing half the job already for you anyhow).
You can (and you should) use the same methodologies one use in "conventional" web-development.
The problem IMHO with Flash applications being "close-web" is not much about the technology itself, but about what people do with it. And quite frankly, the situation really is not that different with "conventional" web-development.
So, not informally, what would I qualify as Open-Web myself?
I would say an application is "Open-Web" if it:
- provides a clear API to communicate with
- preferably implements or relies on existing standards, or establish and document some new ones
- is built and documented in a way that it can be replaced by another, equivalent implementation, in another lingua
- is transparent to the user about what it does with his or her private data
Obviously, a lot of so-called "open-web" applications do fail to fulfill these. And it's not javascript fault, nor Mozilla...
The Flash platform is not standard!
Mostly erroneous: ActionScript 3, which IMHO is 90% of the value of the flash platform, was at some point a proposed evolution of the ECMAScript specification, that got abandoned by the ECMAScript working group (although IIRC it was actually supported by Mozilla).
People who like facts will get them by following the white rabbit from there.
Mmm, speaking about standards... Are CSS-Transitions standards? Or HTML5? Canvas? The video tag? Or XHR? Well, at least they sure weren't when they first got implemented by major browsers makers.
The fact is that innovation most times goes faster than standardization (discussing issues in the W3C processes is way of-topic this blog post, but certainly, that would shed some light on this specific point as well).
I don't think entirely relying on existing standards proves you good, while implementing new stuff would make you evil. On the other hand, I do think what is important is the willingness to make the standards evolve, and to push new modern and innovative ones.
As far as I can tell, Adobe plays decently well on that front.
So, yes, flash is not entirely standard. But Webkit ain't either.
Should I bash Mr. Hyatt?
Yes, flash is bad
What is really bad right now are the arguments above, as used by Adobe's detractors. Most of them are either weak or ill-formed IMHO.
But yes, Flash sucks for several very good technical reasons:
- the whole plugin mechanism is pure and simple horror: the embedding strategy is a disaster, the event propagation a train-wreck, the layout a nightmare, and you need forceps and gloves to have it behave. Doing anything useful with it in a desktop application (an application that is not based on Adobe Air, let say, something really cool, based on XULRunner for example) requires insane hacking on nsplugin. Like my colleague daim puts it (very bluntly): "The Flash plugin is a purulent wart lying on top of the DOM that you need to wrap around again and again for everything". Of course, there is a reason for that: it's not in the browser makers best interest to change that situation. Either way, working with a plugin is a full-time pain in the ass for "real" (aka: "concerned") developers.
- the flash platform has several ugly bugs that should have been corrected eons ago: for example, there is no proper, complete, cross-platform mouse-wheel support (you need to hack it around yourself)
- the flash API is of wildly varying quality: I personally think that the HTTP API is really one of the worth I've had to work with, and that ExternalInterface is way below useful without a shit-load of extra code. Even some good ideas are crippled beyond being usable: the socket programming API is technically impossible to take advantage of in a web context. Even the (praised) layout model (Sprite, DisplayList and so on) has some weirdness. Not to mention the optional components, like FLVPlayback are so widely recognized as unusable that most people end-up rewriting their own.
- you can't extend it practically. Something is missing from the base API? Well, too bad. Need to wrap in your own C++ library? Well you can't. Port it in AS3 (no kidding!). Which clearly means Flash is not useful as a serious application development platform (eg: Desktop).
- security measures makes using some features quite convoluted. Fullscreen, FileReference? You can't use them "directly" - you need to bind the call in an EventHandler listening for a user-interaction.
- several important things are missing from it to make it useful. Threads come to mind first.
- Adobe doesn't seem to have a clear view about where they are going with it: two different compilers (one for Flash Studio, one for Flex Builder), trying to seduce two entirely different crowds (designers with Flash Studio, developers with AS3), makes it look like a dubious choice for a developer willing to bet on its potential
Why is Flash used then?
Good question. Why is Flash used, while it has so many bad technical defects?
Well, the answer is quite simple: because HTML sucks way more than Flash does.
- How do you OpenFileDialog in HTML? Well, input type file. Can't filter files. Can't multi-select. Then you go with flash, like google does.
- How do you pre-process a local file before it's sent over the network in HTML? Well, you can't. You use Flash.
- How do you do cross-domain XMLHTTPRequests in HTML? Well... you use Flash.
- How do you manipulate and render hundreds of images on a zoomable surface in HTML? Well, you don't. You use Flash.
- How do you manipulate byte arrays in Javascript in a sane way? Well...
- How do you develop and maintain a 50k lines codebase in Javascript? Don't misunderstand me, I love javascript, but I would use AS3 for that, which is way superior with such a task to tackle.
Conclusion
I don't personally think that Adobe is evil :-) - despite having these flash-haters-beers-drinkers-sticky-friends :-)
But I don't think either that plugins are the future of the web. Silverlight, for example, looks to me like something that goes against history. The platform may be sexy, but it's not enough. It's a loss time IMHO.
The need for plugins emerged from the weakness of the web platform.
If there is a good reason to dislike Flash (or any other plugin for that matter), that would clearly be the plugin mechanism itself, which should either disappear or be rethought entirely to be really usable. Actually, this discussion should be given some serious attention: how will we extend the web in the future? Let's not repeat past errors and think it's enough to provide a better HTML for today's uses, otherwise, plugins are bound to re-emerge at some point. HTML in itself has intrinsic limitations that no new HTML version will be likely to tackle (how do you change the box model? how do you extend css? how do you change navigation paradigms?).
The Open-Web in my mind will emerge and actually work if people can go in the same way together, and recognize when and where something is good from their competitors. This is not a war (at least for me). Even Microsoft changed a lot on the web front, and made both communications efforts and real improvements and innovations. Just the same, Adobe made some real innovations, and still does. That should be inspiring rather than discarded.That being said, most flash uses on the web today are moot, and should really be replaced by proper neat-JS/HTML/CSS.
The question being, how do we compete with the other uses? From a strictly technical standpoint, that's pretty much:
- provide a better Javascript. AS3 really is a superior language.
- provide a canvas that can actually compete with Flash rendering engine
- provide serious image manipulation capabilities (more generally, binary data manipulation capabilities)
- patch long-standing flaws (file picker and file manipulation prior to send)
- provide a better HTTP API (including cross-domain)
- XBL2
Obviously, Flash still has the huge advantage to be cross-browser, while implementing any of the above would require all three major browser makers to reach an agreement... And that's probably one of the major challenges that need to be tackled.
Finally, as I stressed in the previous paragraph, the "non-flash-web" will still not be adopted by non-technical users unless there are competing authoring tools exploiting the sexy features.
With all the respect I have for past and present WYSIWYG HTML editors, they really are not appealing to graphic designers, and they will never be, unless some serious work is done, which unfortunately I don't see coming.
Adobe clearly led the way on that front. Let's play catch on that, for a start.
PS: Kind regards go to the Moz-Friends that I portrayed full of beers in this post :-)

Comments
#1
Laurentj
Monday, November 9 2009, 09:55
>How do you do cross-domain XMLHTTPRequests in HTML? Well... you use Flash.
or you use a decent browser, like Firefox 3.5
>How do you OpenFileDialog in HTML? Well, input type file. Can't filter files. Can't multi-select.
Use Firefox 3.6, with <input type="file" multiple>
>How do you manipulate and render hundreds of images on a zoomable surface in HTML?
With Canvas, when it will be fast enough, or with Canvas3D, when it will be available in the next Firefox 3.7 ;-)
>How do you manipulate byte arrays in Javascript in a sane way?
You use a nightly of Firefox, with CanvasArray ;-) http://blog.vlad1.com/2009/11/06/ca...
I think that when Firefox 3.7 will be release, we could start to develop an implementation of our zoom browser with Canvas 3D ;-)
#2
Martin
Monday, November 9 2009, 12:50
And nothing about accessibility ? Is Flash accessible ? HTML yes ! ;-)
@Laurentj > ok, Firefox 'll do that, it's very cool ! But how much time to have 90% of the users with a browser who can ? If it's not a standard, it's difficult to implement it...
#3
dmp
Monday, November 9 2009, 13:53
@laurentj: yeah, totally agreed. The whole world should use a Firefox nightly. Now, I woke-up 5 hours ago already ya know. :p
@Martin: sure, flash is bad - that's my line actually :-).
#4
dmp
Monday, November 9 2009, 14:04
As for flash not being accessible while HTML would globally be, this I think is yet another misconception.