For rich-internet business applications in 2012 - are you recommending Flash or HTML for your clients?
There have been a few variations of this question asked in the past few years, but in light of recent developments (e.g., Adobe giving up on Flash for mobile) - I'm hoping to get a sense of the current thinking...
Long story short - my company develops web applications for Financial service firms.
For years, we've focused on Flash development (see http://stackoverflow.com/a/395260/49383 for the reasons we chose Flash, but in short, our apps feature a lot of asynchronous communication, highly responsive interactivity, charting, data visualization, drag-and-drop, etc.)
However, my clients now realize that anything they develop in Flash will NEVER be available on a mobile or iOS device.
Ideally, they'd like a single application that works everywhere.
I've had a hard time explaining why I don't think this is really possible. In short, you've got to consider:
- HTML 5 vs. HTML 4
- Large screens vs. small screens
- Touch-based input vs. mouse-based input
Of course, it's theoretically possible to build a single application that utilizes the latest in responsive design (to handle large AND small screens), utilizes the latest HTML 5 capabilities but degrades gracefully (to support the millions of users who are stuck on IE 6, 7, and 8), and somehow supports both touch input (huge hit areas, no hover/rollover behaviors, pinch-to-zoom, etc.) and mouse-based input.
However, in my opinion, this requires a TON of additional code and is nightmarishly difficult to test.
The alternative - what I generally tend to recommend - is a Flash version for desktop users, and a HTML5/Touch-only version for mobile/iPad users.
The huge downside of this is that you've got two totally distinct sets of code. The upside is that you can create the optimal experience for both sets of users (i.e., you don't need to write code to support sub-optimal experiences for poor IE6/7/8 desktop users who are otherwise stuck with HTML4), and you can safely assume that mobile users are using a VERY current, VERY capable HTML5 compliant browser.
Is my thinking correct? Is there a better approach?
Short of patiently explaining to them how Steve Jobs was a greedy liar who pushed Flash out to protect App Store revenues (not a recommended sales pitch tactic), you'll have to make a tough decision at some point.
You can export to AIR for mobile devices - obviously this stops it being browser-based, but you might consider this a price worth paying for all the dev time it'll slash off, if you can persuade your clients to go for an app over a URL - given that the mobile experience is so much different, you may be able to (we have). There are some performance issues with AIR, but they're getting better, and if you're building web-apps over games/graphically-intensive programs you won't notice.
Personally, I much prefer using Flash for any application past a given complexity - I enjoy the challenge with HTML/JS, but after a while it lurches into masochism, debugging JS is surely a taster of what hell will be like. It's just not the language for application development, at least for someone with OO-background, but if you're happy with/used to this or your application isn't too complex this may not bother you. I will be looking into using Google Dart, which is a language more like Java/AS3 which can compile to JS - but I've not really had a chance yet, so couldn't say if it's worth checking out.
Should you opt for an HTML version, you needn't really worry about HTML4 vs 5, so long as you don't use the new tags (which are mostly there to make it more readable, you can approximate with div classes) there isn't really much need. Obviously videos etc will need a flash fallback though.
With jQuery you should be able to get around browser quirks with it comes to JS support, personally I'd offer a Flash/AIR package OR an HTML-only solution - you may as well have one common codebase which you can tweak for platforms, than two distinct ones.
Hope this helps.