We don’t need Flash on the iPad, we need better tools to build HTML5 sites

The recent discussion about whether the web needs Flash or not was overdue. My opinion is this: Yes, we need an alternative to Flash Player, and HTML5 could soon replace it in most cases. But most of all we need a good IDE to develop content for modern browsers.

Flash has two critical shortcomings that make it hard to use for many projects, not only on mobile devices:

  1. Flash Player is an alien in the browser. You just need to look at the strange code that is necessary to embed it to know that. You can’t use your browser’s “Find” function to search its text. The browser can’t save passwords you’ve entered in a Flash form or even fill out a form with the data you’ve entered on other sites. Flash wouldn’t trigger special input tools of a device like mobile Safari’s Picker UI or work with the tap-to-zoom feature. You can’t use the browser’s controls to increase the font size used inside Flash Player. And there are many other examples. I wouldn’t create a complex UI for the browser with Flash anymore because of this.
  2. Flash needs too many system resources. Thats’s something I always thought would get better over time with faster CPUs, but it never did. I don’t know if it is because of Adobe’s laziness or because content keeps getting heavier as well (more pixels per videoframe, more complex video codecs, more 3D objects, bigger screen sizes etc). All I know is that a site that makes heavy use of Flash burns my 2.4 GHz Core 2 Duo today just as it did with Flash Player 4 and my 500MHz Pentium III ten years ago. And that’s why I think Flash Player will never really work on a mobile device.

But today, using HTML5/Canvas for rich clients instead of Flash is no option either as it is not widely adopted by the browsers yet. You would end up in browser hell again. So what can you do as a Flash Developer to solve this situation in the next years? I think it depends on the type of project you are creating:

  • If you create one of these FWA CPU burners: Don’t care at all, make it full Flash as always. Nobody could enjoy it on a mobile device anyway because of the smaller screen size. Wear your blue lego shirt with pride! ;)
  • If you build a video/audio player, a slideshow or interactive charts: Use the Progressive Enhancement technique. Build a Canvas/JavaScript/CSS-based solution and implement a switch to replace it at runtime with a Flash version, if the browser doesn’t support the tags you’re using. Yes, that means extra work, but you can tell your client that he gets an “iPad version” for free! He will love it.
  • If you develop games: Most Flash games can’t be simply ported to mobile devices, even if they run Flash Player. That’s because you have different input controls. You don’t have a keyboard on the iPhone for example (btw: HTML5 games like this one suffer from the same problem). So you have to decide which platform you want to build for anyway. Or try to design your game to work without a keyboard and mouse over gestures etc. In that case you can hopefully run it on Android with the upcoming 10.1. player and probably port it to the iPhone as a standalone app with the upcoming Flash CS5 exporter.
  • If you develop a regular website: Try not to use Flash at all. Especially don’t use Flash only because you can. I did that a lot in the past and instantly regretted it when the Eee PC and the iPhone came out. If you have to integrate media content that can only be displayed on IE with Flash, use Progressive Enhancement. It’s the only way to ensure a good experience across all devices and browsers without creating a special version for each platform.

So chances are you have to learn some JS/CSS/HTML5. But probably you’d have to learn that anyway in the next years. And it can be fun, because nowadays JavaScript-Frameworks like jQuery will do the dirty DOM-work for you. The only problem is that you won’t be able to continue working with the tools you’ve got used to. There’s no IDE for building HTML/CSS/JS-based interfaces that is as easy to use as FlashBuilder/Catalyst or the Flash IDE. Today, I’d say the best thing about Flash (besides AIR, which is a totally different story) is AS3 and the IDE. And the biggest problem most Flash developers will face when they start to create HTML5 is probably JavaScript and the lack of a truly integrated IDE.

If Adobe wants to keep their customers happy they should stop whining about the iPad and start creating a great IDE for developing HTML5 apps. And by that I don’t mean copy/pasting SVG snippets from Illustrator to Dreamweaver. What about coding with AS3 and converting it to JavaScript in a cross-compiler manner, like the Google Web Toolkit does? What about introducing concepts like Skin States or the Timeline to HTML5 development? What about drawing your SVG graphics and cropping images within your coding environment? Automatically creating CSS sprites from your designs?

I definitely want that more than a Flash Player for the iPad.