However, the Flash runtime is the reason people complain about Flash. It is slow, it leaks memory, it crashes like crazy and has been a second-class citizen on every platform other than Windows since forever.
JS/HTML5 on the other hand is a mess in terms of development tools. But it is getting more and more reliable. And it's a real standard with multiple implementations that are extremely competitive. Apple was right for excluding Flash from their mobile browser, as for mobile phones HTML5 is currently much better, even though the technology powering it is newer than Flash.
Adobe's current plans are to build development tools for HTML5/JS too. They are even pushing for improvements in the standard, like CSS3 Regions.
- I will miss being able to declare classes using a sane syntax (Coffeescript helps in this regard)
- I will miss the optional type annotations, which caught many a bug for me (you can use JSDoc annotations + closure compiler, but only if you like placing a verbose comment in front of every single variable declaration)
- I will miss having an IDE that can actually do code completion (this not possible without type annotations, so it's not coming to Javascript any time soon)
- I will miss interfaces
- I will miss namespaces (there are various ways to hack namespaces into Javascript. They are all letdowns.)
- I will miss color transform filters, drop shadow filters, and blur filters (might become part of CSS if Adobe's proposal gets approval)
- I will miss the (mostly excellent) API documentation (MDN tries its best, but is not even close)
- I will miss masks (of any arbitrary shape)
- I will miss being able to create and dispatch my own events without having to use someone else's event framework
- I will miss having all my resources compiled into one blob and loaded together, rather than having to worry about preloading all of my UI images
- But most of all, I will miss performance. Yeah, Flash is buggy/slow/memory hog blahblahblahblah. But have you tried doing anything graphically complex in HTML5? Holy shit, your processor will scream. Things that Flash used to laugh at will bring Chrome to its knees. Don't get me started with IE.
So no, Flash is not great. It has a ton of warts. But HTML5 is not ready. Not even close. So we're going to have to spend the next ~2-3 years in techno limbo while it catches up. And that makes me sad.
HTML5 is particularly not ready on mobile. For example...don't use gradients, since they kill performance. Oh, and don't use opacity either, since that also kills performance. Seriously? I need to build a UI that doesn't use opacity animations? FFFfffuuuu--
Apologies for sounding like a grumpy old man, but promises of "someone will come and fix it with a standard...at some point" don't really get me excited. I worry that in vilifying all the things that Flash did wrong, the web world is going to ignore all the things it did right, and refuse to integrate those things into HTML.
don't use gradients, since they kill performance.
Oh, and don't use opacity either, since that also
kills performance. Seriously?
The problem with the Flash player is that by design it assumes all applications have such needs, like opacity, gradients and animations, when this is not the case. Even with the drawbacks you mention, an interface built with jQTouch for example is pretty snappy on the iPhone. See the demo: http://jqtouch.com/Android in particular is indeed having problems and I wasn't at all pleased with the results I got from jQuery Mobile. On the other hand Android has this problem with the UI in general, as hardware-accelerated graphics has been its weak point.
But you're comparing here the performance of browsers on mobile phones with the performance of Flash on the desktop. Adobe has yet to come up with a decent alternative for mobiles. I have Flash on my Android browser and I'm really not impressed. In fact, I deactivated it.
Things that Flash used to laugh at will bring Chrome to its knees.
That goes both ways too ... try loading 5000 thumbnails in a Flash UI and compare it with Chrome. I do that whenever I organize my Flickr account.Also in Chrome special effects may not be so snappy, but animations and games are doable. And they only added accelerated graphics support recently (I'm not even sure if it's enabled on my computer). Example: http://chrome.angrybirds.com/
Angry Birds is indeed not representative of what normal people will do with HTML/JS, as Rovio engineers are pretty talented. But I know dozens of games created in Flash that are less impressive and more sluggish than this Angry Birds version ... the truth is, good developers will make snappy and cool things using any technology. Bad developers won't.
And this may be an anecdote, but I never, ever used a Flash interface that I liked using. I even hate it whenever I'm viewing a YouTube video because it blocks my browser's normal shortcuts.
Agree. An example is graph visualization. Fire up your CPU monitor and go to http://arborjs.org/atlas/ and view this very cool physics-driven mesh visualization written in Javascript. You'll see the needle jump to 95% or more. On my relatively modern laptop, if I run this for more than a few minutes, it shuts off due to overheating. Also, this app does not work on IE.
By contrast, I can run an similar Flash-based visualization and CPU usage ratchets up to 60 or 70% but not more, and it works on IE.
If it's vector, it can be done with SVG/CSS3
…drop shadow filters…
box-shadow?
…and blur filters
Canvas?
http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.h...
I will miss masks (of any arbitrary shape)
PNG with alpha?
…rather than having to worry about preloading all of my UI images
Something like this may work:
$("#blob").bind("load", function () {});
or even: body { display: none; }
<body onLoad="$("body").fadeIn();">
But most of all, I will miss performance. Yeah, Flash is buggy/slow/memory hog blahblahblahblah. But have you tried doing anything graphically complex in HTML5? Holy shit, your processor will scream. Things that Flash used to laugh at will bring Chrome to its knees. Don't get me started with IE.Not on a Mac. Even a freaking side banner will make the CPU spike. There are a few cases where it is slower, but it's rare and we can all help optimize.
HTML5 is particularly not ready on mobile. For example...don't use gradients, since they kill performance. Oh, and don't use opacity either, since that also kills performance. Seriously? I need to build a UI that doesn't use opacity animations? FFFfffuuuu--
Android or iOS? I'm actually pretty impressed with the hardware accelerated effects I can get in iOS if I don't do much stuff at the same time.
Check this link:
http://mir.aculo.us/2010/06/04/making-an-ipad-html5-app-maki...
HTML is the new HTML5
How much more awesome will HTML, JavaScript, and CSS get when Flash finally goes away?
I believe if the Flash development environment was available for JS/HTML5 today, Flash hackers would be much more excited about it. It's not the fact that Flash is going away that causes sadness. Rather, it's the gap between that and having an equally powerful environment for JS/HTML5.
Another thing I forgot to mention ... Adobe already has an AS3 to Javascript compiler that produces Google Closure compliant code (or this is the plan anyway) and they are using it internally for their own projects.
And you forgot to mention one of the main issues with Flash: security (or the lack of thereof), it has had so many holes it is starting to make Active X look good (hyperbole, I know, but not by much).
Adobe AIR is a much more adapted and competent environnement, and it's getting more traction that ever. Seems a pretty sunny landscape for AS to me.
The AIR runtime is there for serious applications, and I would expect it to be much funnier than webapps.
Edit: About Flash on android, there's the free, open submission process for full featured apps on android. An app would obviously be a better match for complex applications than Flash on the browser.
I do agree though, that complex browser apps just don't work on mobile Flash. I had been hoping that maybe somehow Adobe would get it to work, but obviously they haven't. And now, officially, they won't keep trying.
While iOS would be the major platform for heavy applications, lightweight utility apps get more and more developped in a cross-platform manner. And as a user I don't feel a great loss, since the apps are more often updated and are OK for the job.
Being a second-class citizen should be less damaging now than at the time we were running clunky java or Qt apps on windows or OS X, like a few years ago.
At least we'll get used to it, and it might become the norm for a whole class of apps.
For the position of AIR...it's compile compatible with iOS, android, it has a runtime on Playbook and the upcoming BBX, it seems to be OK on windows phone as well. I have the feeling that it is where "we" really wanted to see Flash move forward. Not as an HTML extension, but as a real immersive platform.
[1]: http://jeash.com/ [2]: http://haxe.org/
I can certainly hope that HTML/JS evolves more in the direction of AS3, though I fear that Adobe will either push in the direction of Canvas-manipulating tools (where now you have a crappier API than Flash and you still lose the ability to arbitrarily throw some html in the mix (say, for including ads)) or their tools will mostly lend themselves to huge bloated div-fest monstrosities like what we've seen out of Muse so far.
It seems like a lot of work went into switching, considering the functionality is still the same as the Flash version. Did any good come out of switching to HTML5?
Upsides:
It's easier to integrate ads and other third-party content like Facebook like buttons/comments, Youtube videos, etc. Unless you want to destroy Flash's performance by using a wmode other than window, there is no way to mix flash and html/iframe content. I'm pretty sure most people's hatred of Flash comes from ads that are not only annoying and poorly coded, but embedded with opaque or transparent. Then they will melt your laptop, yes.
It's easier to hire for, HTML/CSS/JS are more common skills than AS, especially when you're not hiring to do 'push movieclip around' Flash, but working inside a huge Flex app with 90% custom in-house components. It's also easier to find people who might not have a lot of development experience but are good at pushing around html and css to finetune the interface to our designers' desires. Maybe that got easier in Flex in Flex 4 with the Spark components, but we weren't allowed to drop support for Flash 9 despite it being less than 1% of visitors, so we were still on Flex 3.
Downsides:
Performance. Holy crap performance. The flash site still ran well in ancient browsers like IE6 and IE7. The new site struggles in IE7 and we had to drop support for IE6 entirely (performance was not the only reason there but, you know). And on the subject of mobile, the flash site was sluggish but technically worked on my Nokia N800 tablet running Maemo. New site doesn't. We're working on making this better, of course, but the new site was written pretty quickly and accumulated a ton of technical debt, mostly in the form of poor performance tradeoffs.
Stability. Ditto what I just said about IE6 and IE7. And now throw Opera in there too. jQuery eases a lot of cross-browser pain, but not all of it. The edge cases in which Flash behaves differently on different platforms are just that, edge cases, and usually occur when you have to cross the boundary into JS. So now instead of basically one platform to test your code on you have...well all the major browsers * all the major OSs.
Maintainability. When your application is pushing the 100k LOC mark, strict typing is a godsend. So are real namespaces, and interfaces. It is very very easy to write stupid code in JS. You can write stupid code in any language, of course, but at least in Flash the compiler will yell at you if it's blatantly incorrect, and exceptions throw useful stack traces on all platforms. I don't know what it is about JS and swallowing errors, but sometimes it's a battle just to figure out where in the code you need to even start looking for the error. Or that an exception even occurred.
I guess I should make a blog post about the switch someday...
But isn't the Adobe game plan to keep the powerful development tools that you know and love, but have them spit out HTML5 rather than Flash?
What I've seen so far of Muse doesn't really inspire me to want to use their new HTML5 tools. I didn't like Flash Pro either. Those tools are not written for developers, they are written for designers (or 'devsigners' as terrible as that moniker is).
Now, if Adobe came out with their own version of something like Coffeescript or Google's Closure Compiler, where you wrote your code in some sort of stricter subset of ECMAScript that compiled to browser JS, I'd check it out. Especially if they somehow came up with some sort of sane rendering API that could make valid HTML. But I suspect the closest they will get is writing tools that convert ActionScript to work in Canvas.
[1]: http://en.wikipedia.org/wiki/Tamarin_(JavaScript_engine)
Really? I used to do a lot of AS3 work; it is hands-down the worst development ecosystem I've ever been involved in.
I don't have nearly as much fun writing HTML/JS as I did writing AS3. I liked the (optional) strict typing. I liked writing for a single target and knowing it would just work. I liked having the power to say, "Render this thing in just this spot," and having it do what I wanted rather than spending hours fiddling CSS.
So as much as the decline of Flash is generally heralded as a good thing (and I agree that Adobe really never managed to fulfill their promises/goals with Flash on mobile devices), I'm still going to miss it when it's gone.
Edit: Just want to note that I'm speaking from the perspective of writing large, complex webapps in AS3/Flex, not just websites. Use the right tool for the job, etc etc.