I’m probably going to get in trouble for this, but I’ll let you in on a little secret. Your hatred of Flash is wrong and misplaced. I love web standards and I love the magical unicorn that is HTML5. I don’t hate Flash. Sure, I have my disagreements with it, but the “FLASH SUCKS” mantra that was spawned with the iPhone and only gets louder and louder these days is just silly. Actually, it goes beyond that – not only is it pointless but its actually hurting the JavaScript and development community at large.
I’ve been around the block when it comes to web development and I’ve witnessed this sea change first hand. I’m not going to go in and recount war stories, but I’ve had my ups and downs working with Flash and Flash developers. I can’t really pinpoint a specific moment when people started to question it, but I remember working on a site for a high end fashion client and seeing early versions of script.aculo.us and just being blown away. It seemed so simple: this animated dropdown menu didnt need to be designed and compiled in an entirely different environment! It could all be one thing. Sure the animation was pretty chunky and yeah it might have crashed the occasional Firefox, but it seemed like magic – and I wanted more. It took some convincing, but we started to build out more and more outside of Flash and it felt great. Then there was the iPhone, and soon enough it all seemed so repulsive. You mean, I can’t see what kind of noodles this Thai Fusion place sells!? argh. I dont know how Apple did it, but wow, what a spin. Instead of blaming the device, or even better, the authors of these restaurant’s websites – we all started blaming Flash itself. FLASH SUCKS became the new mantra and we all went along with it. Like an angry mob with iPitchforks we stormed Flash’s castle.
The result of all this yelling and vigorous finger pointing is in some ways what we all call HTML5. This glory train of hope, a beacon from a distant land where everything is a standard and you can order thai food from your phone. The hilarious thing however, is that as JavaScript developers the joke is on us.
Why People Hate Flash
Beyond the pure cargo-culting and the flash-blockers, some people at the heart of the argument do have their reasons. Lets take a brief detour from the main story to examine some of them.
It’s a proprietery product with a single owner
This is the con that most open source developers take issue with and something that hurts somewhere deep inside. As a very active open source developer, not only on my own projects, but as part of the community at large, I really don’t want to work on closed platforms. Since my first experience with open source and my first experience reporting, finding and fixing a bug, I haven’t turned back. Ruby, Rails, jQuery, etc. the benefits of open source are more than I can extol here. As a user, though, the core of OSS is transparency. It’s discovering a nasty bug and being able to effect change. This factor is obviously a range between projects but at some level, even if you don’t report a bug, it’s just knowing it’s there. It’s the knowledge that a community of people is willing and able to fix things. The lack of this is what instills fear in me when using software these days. As part of a team we’ve experienced bugs in Flash and reported them, and waited for a fix. When it’s something critical, sometimes you just want to be able to poke at the source. Even if it’s just to leave and say not my problem. I get this, it is a problem. I can’t really excuse this, other than saying that this same problem exists with most software and tools people use on a daily basis. Open Source is the exception, not the rule. Apple and the iPhone SDK is as much of a problem in this regard as Flash. Steve Jobs’ saying that they’re commited to open source and standards by supporting Mobile Safari and Webkit doesnt mean that the SDK or the tools to compile iPhone apps are going to be open source any time soon.
It doesn’t work on my iPhone
This is true, it doesnt and that’s a problem. In Steve Jobs’ angry missive he blamed unreliable performance and battery draining as well as other things in their lack of support for Flash. I have an Android these days, and it is slow, but at the same time, it’s pretty useful to have Flash running on the device. Does it drain battery? Probably? No more than watching a video or checking Twitter every 20 seconds. Clearly there were other factors at work there, and I’m not blaming Apple really. It is annoying that a lot of sites rely on Flash at their core (in part Paperless Post is not exempt) but really that’s an issue with developement practices, not with Flash or the device.
With or without Flash mobile is really a seperate concern. On mobile devices making something interactive, fast, and compatible is really the challenge.
(In fact Interactive, Fast, Compatible is really the CAP of mobile applications). Unfortunately the promise of HTML5 only sort of solves this at this point. Have you used canvas on an iPad? It feels like you’re running Flash in IE6 on a Pentium II. SLOW. Sure, there’s CSS Animation, but that really only takes you so far. I guarantee this will change in the next short while (years not months), but we’re talking about now.
It’s not crawlable by search engines
At its core this is true, but its just as true as with AJAX applications, as can be seen by the recent hash-bang hubub. With Flash or JS you have the same challenges and roughly the same solutions. The most complete solution at this point is just to make a mobile or JS and Flash-free version that the more interactive version is a layer on top of. The fact that your restaurant’s website doesnt have an HTML menu is not Flash’s fault, its the developer’s fault for not making it accessible.
Its slow and crashy and makes my fans turn on
Yes, there are slow and buggy sites out there. Yes a lot of them have .swfs on them. Is Flash as a tool and platform really at fault here? Flash openened up the web to interactivity, high quality streaming video, and robust applications. As a tool it’s very very powerful. With great power comes great responsibility. It’s pretty easy to invoke a memory leak in Flash and it’s up to the developers to contain and optimize their apps. Again, this is really a problem of education and the development community at large. The most common target of this complaint are Flash based advertisements and banners. So an ad for body spray takes over your page, and seems to slow your whole computer down. Thats pretty annoying. Well just wait for DOM/canvas based ads. They’re coming, and they’re manipulating your entire page and breaking your JS. Just you wait.
A couple of reasons to love Flash
At the same time, and despite all the yelling, there are some clear reasons to still love Flash. It was the first to do a lot of these things we now call HTML5 on the web. In many and maybe most cases it’s still better at doing them. In particular, while HTML5 video works pretty well on certain devices and browsers, it’s pretty far behind its Flash counterpart in terms of speed and general functionality. Fonts as well. One of the sticking points we’ve had at Paperless Post is the lack of detailed font controls and especially interactivity with fonts. Sure @font-face is nice, but it has its limitations and compatibility issues when it comes to pixel perfect rendering. Canvas fonts are even worse.
Flash is also pretty much everywhere. Besides the iThings, Android, your browser (every browser) its there and works almost exactly the same. That’s pretty sweet. It was one of Flash’s original promises and it still rings true (with one major exception). The proprietary thing also comes in handy in this respect, too. I’m not agreeing with it, but when a bug is fixed or a security hole is patched, updates come rather quickly to your end users. This is as compared to the wide range of browser release cycles.
From a development standpoint, ActionScript is close to something we know and love (presumably): ECMAScript. Newer versions have added more Java-like package management but a lot of the syntax (; and {}) et al will be very familiar. If you have only ever programmed on the Flash timeline, you would also know that most ActionScript apps are coded in a normal editor of your choosing and compiled on the command line. In fact, there’s a pretty cool project generation and build tool for ActionScript in Ruby called sproutes. Its syntax tends to lean more towards the Java and less towards the script, but it’s still very easy to pick up. In fact, I jumped in to one of our projects at Paperless recently and was able to code up a bunch of a module in a single day with only passing help from our resident AS3 expert.
There is hope: quit being an asshole.
That all is great, but it misses the biggest and best thing that Flash has – a thriving community of extremely talented developers. Its not uncommon to find a Flash developer at this point with > 10 years experience coding in Flash for the web. 10+ years! How many years have you been programming JavaScript professionally? For how many years has it been your primary focus? How many large scale interactive applications have you built? My guess is that the average Flash developer has built 20 times that. For good reasons. Not only have they had better tools for most of that time, but they’ve also been in heavy demand for that whole time, and building applications non-stop. Many of the challenges that JS and HTML5 developers are facing when building these large scale interactive apps, the Flash developers have already solved. They have those algorithms, that knowledge of 3D, that ability to turn code into motion and excitement.
As a talented Flash developer, you’re probably starting to explore the world of HTML5 and canvas and in some cases Cocoa and Objective-C. You’re starting to learn how to adapt your Flash expertise to this brave new world. In some cases you’re pretty put-off by the attitude of the JS community and its blind hatred of a tool and framework that you’ve devoted a portion of your career to up to this point. Understandably. A lot of these people are being assholes. If you devoted a lot of your waking hours to Java, it was and is really hard to want to ease into Ruby due to the bile and anti-you sentiment coming from the Ruby community. Over time, Ruby has adapted to its community and its forebearers (see JRuby).
As a JavaScript developer, it’s now your responsibility to stop the hate and welcome these super smart developers with open arms. Ask them questions, lean on them for advice, for hacks, for problem-solving. Hire them, even! They will appreciate it and they will blow your socks off. The best Flash developers aren’t tied to a language or technology, they’re just really interested in making awesome, boundary-pushing applications for the web. The fact is that they’re moving this way with or without you. If you help them, and respect them, and learn from them, your app and eventually the entire web will be a better place. If you shun them, they’ll just do what you do, but do it better. They’ve already done all the things that you’re trying to accomplish.
Flash isn’t going anywhere for a little while, and complaining about it doesn’t help. Instead let’s all quit being assholes and work together to push the open web and open standards. Most importantly, let’s learn from all our mistakes and triumphs and hacks and continue to make the now web more fun.