Feeds

Down but not out: Flash in an HTML5 world

Adobe hedges bets with Nitobi

Build a business case: developing custom apps

Anyone hoping to pronounce Flash dead as Adobe transitions to the brave new HTML 5 world will have been disappointed, based on the company's MAX Conference last week.

That said, there is evidence of a partial transition towards HTML. The big story in this respect is Adobe's acquisition of Nitobi, creators of the PhoneGap tool for building mobile applications from HTML and JavaScript. Nitobi chief executive Andre Charland gave a brief demonstration of PhoneGap on stage at MAX.

Adobe also talked up Edge, its tool for creating HTML 5 animations which is now in its third preview, and showed CSS Regions and CSS Shaders, two projects it has worked on in the form of contributions to the open source Webkit HTML engine, and in the case of CSS Shaders a submission to the W3C.

Adobe CSS shader

Bend this: A CSS Shader example showing an unfolding map

CSS Shaders is influenced by the work Adobe did on Pixel Bender for Flash, and enables CSS Filter Effects to be extended with shaders that process the 3D geometry and the colour of pixels.

At a MAX session, Adobe also showed how Flash Professional, its designer-oriented authoring tool for Flash, is becoming an authoring tool for HTML as well. Subject to limitations, you will be able to publish a Flash Professional project to HTML and JavaScript, with partial conversion of ActionScript to JavaScript, in the next major Flash Professional release.

Is Adobe then retreating from Flash? Not so fast. Certainly there was more HTML content at MAX than in previous years, and these sessions were among the most popular, but if you look in detail at the session list, you will find that Flash predominates. The biggest splashes at the day two keynote were Flash-related.

The Flash content at MAX was dominated by a trio of new technologies delivered in Flash Player 11 and AIR 3. AIR (Adobe Integrated Runtime) creates a means to run desktop and mobile apps that use Flash as a runtime engine.

The first is Stage 3D, formerly known as Project Molehill, a 3D hardware-accelerated API for Flash. An implementation for mobile is expected early next year. Coding for Stage 3D is a specialist task – as with other 3D libraries such as Open GL – but the results are impressive. In the MAX day two keynote Epic Games announced that its Unreal Engine for game developers is coming to Flash. "We chose as our demo a fully playable level from Unreal Tournament 3 and it turned out to look even better than the version we shipped on Xbox 360 and PlayStation 3, with improvements like global illumination, better shadows, and god rays!" said Epic vice president Mark Rein.

A related project is the open-source Starling Framework, which uses Stage 3D for accelerated 2D graphics and is easier to use.

The second key new feature is the Captive Runtime for AIR. This lets you bundle the Flash player into a native executable, in a similar manner to the packager Adobe created for iOS to overcome Apple's Flash ban. The late Steve Jobs may have done Adobe a favour. Despite the inherent inefficiency of shipping each app with its own player, the captive runtime makes AIR more attractive to developers, since from the user's perspective it removes the Flash dependency. Captive Runtime support is in AIR 3 and works for all supported desktop and mobile platforms except iOS, which still has the packager. Currently the iOS packager is apparently better optimised, but this will change in future updates.

The third feature of the trio is that native extensions are now available for AIR, making the runtime truly extensible for the first time. Adobe's implementation makes these challenging to write, but easy to consume, since they are packaged as libraries, which from the Flash end look similar to a .SWC, a standard Flash and ActionScript library. ActionScript is the Flash programming language, a kind of forked version of JavaScript.

Native extensions have an .ANE extension. Internally, a native extension has an ActionScript interface, plus one or more implementations for different platforms. Each implementation is also written in ActionScript, but can also make use of an ExtensionContext class to access native code. The native libraries themselves are typically written in C or C++, or Java in an Android library, though other languages are possible and one of Adobe's examples calls Microsoft .NET. They are not sandboxed. The main limitations are that they cannot re-implement ActionScript classes, and placing native user interface controls on the Flash surface is not supported.

There are several areas where native extensions will prove useful. These are making use of otherwise inaccessible device features, reusing legacy code or existing libraries, and improving the performance of critical code. Since they are easy to distribute and have developer-friendly ActionScript APIs, we can expect to see a proliferation of native extensions some of which will be widely adopted. Taken together, these three technologies make AIR more interesting than before, particularly as a cross-platform mobile toolkit. It is significant that the six new tablet apps, including Photoshop Touch, that were previewed by Adobe at MAX are built with Adobe AIR but delivered using the captive runtime, and make heavy use of native extensions.

MAX attendees also heard about new features coming to future versions of Flash. Among the most significant is concurrent programming for ActionScript. This will look similar to JavaScript's web workers, and while it will not give developers complete freedom to use multiple threads, it will be relatively safe and easy to code.

What about PhoneGap then, which is also a cross-platform toolkit for mobile? A good question, and one that Adobe will only answer in vague terms. "If you are building a rich game, use Flash. If you are building data-driven applications that are fundamentally pulling source from an end service into an application you can use HTML 5 and PhoneGap to get on those devices," Adobe's senior vice president David Wadhwani told me. Note, though, that he said "can use" to allow for the fact that mobile AIR also covers that second scenario, though currently on a smaller range of devices.

Follow the money

Adobe is hedging its bets, and the fact that it remains the Flash company may make it an uncomfortable home for Nitobi employees with their commitment to HTML and JavaScript rather than proprietary runtimes. Charland is aware of that tension, though he remarks in a blog post: "If you doubt Adobe's intentions, it's important to consider how Adobe makes money – it's from tools, services and solutions, not shipping runtimes."

Flash also remains important for web developers who need a consistent cross-browser platform for rich applications. Some came to MAX anxious for reassurance that Flash will not be abandoned. "It would be like returning to the browser wars," one developer told me.

That reassurance was evident at MAX. Flash is not dead, though it is becoming a specialist resource rather than something to stick on web pages to spice them up. Thank goodness. ®

Gartner critical capabilities for enterprise endpoint backup

More from The Register

next story
Why has the web gone to hell? Market chaos and HUMAN NATURE
Tim Berners-Lee isn't happy, but we should be
Microsoft boots 1,500 dodgy apps from the Windows Store
DEVELOPERS! DEVELOPERS! DEVELOPERS! Naughty, misleading developers!
Mozilla's 'Tiles' ads debut in new Firefox nightlies
You can try turning them off and on again
'Stop dissing Google or quit': OK, I quit, says Code Club co-founder
And now a message from our sponsors: 'STFU or else'
Apple promises to lift Curse of the Drained iPhone 5 Battery
Have you tried turning it off and...? Never mind, here's a replacement
Uber, Lyft and cutting corners: The true face of the Sharing Economy
Casual labour and tired ideas = not really web-tastic
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
prev story

Whitepapers

Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Backing up distributed data
Eliminating the redundant use of bandwidth and storage capacity and application consolidation in the modern data center.
The essential guide to IT transformation
ServiceNow discusses three IT transformations that can help CIOs automate IT services to transform IT and the enterprise
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.