Friday, April 13, 2007

Is XML the Future of UI Development or is it JavaScript?

A common trend in the new crop of desktop UI frameworks is that they are XML based with some sort of support for JavaScript. We take a brief look at AJAX, WPF/XAML, Flex/MXML, and Firefox’s Gran Paradiso.

The first up is AJAX, the poster child of the Web 2.0 craze. Being essentially a new technique to leverage existing HTML and JavaScript technologies, there is little reason not to use HTML. While not currently suitable for desktop application development, it did set the stage for what was to come.

Microsoft is betting heavily on a new XML based language called Extensible Application Markup Language (XAML). For traditional Windows developers, this is leveraged through Windows Presentation Foundation (WPF). WPF looks a lot like ASP.NET in that one language, XAML, is used for presentation while another, C# or VB, is used for event handling in a code-behind file.

Aside from the technological differences, XAML radically changes the development cycle for user interface design. User interface specialists and graphic artists can use XAML editors such as Expression Blend or ZAM 3D to create the user interfaces, then turn the files over to developers using Visual Studio. No longer will developers work from non-interactive screenshots put together in Visio or Photoshop, at least in theory. Judging by the rather mixed success of the ASP.NET, the effectiveness of this is questionable, but at least the potential is there.

The XAML story doesn’t stop there. Microsoft is also promising cross platform support is promised with Windows Presentation Foundation/Everywhere (WPF/E). This product is going to start with JavaScript as its procedural, event-handling language, with a later version supporting the Common Language Runtime (CLR). This is seen as a direct competitor to other browser-hosted frameworks such as Flash/Flex.

One thing to note about the XAML technologies is that the designers don’t really exist yet in a finished form. Expression Blend is currently a release candidate, and Visual Studio won’t have anything more than a CTP until VS Orcas hits beta later this year.

Next up is MXML. This is the XML-based presentation language used by Adobe Flex. This, combined with the JavaScript derivative ActionScript, was originally released by Macromedia in 2004. Over the years tool support has improved, but it remained shackled to the browser and the Flash player. Adobe Labs seeks to change that with the Apollo project. The goal of the Apollo project is to create a cross-platform runtime that will free Flex from the browser and allow it to run as a stand-alone desktop application. Essentially stealing Java’s original playbook, they are bringing the fight right into Microsoft’s living room. And with their superior UI capabilities, they just might pull it off.

Finally there is the new offering from Firefox, Gran Paradiso. Unlike Microsoft, who created a new language to get onto the web, or Abode, which created a new runtime to get off of it, the Firefox team is sticking with what they have. Gran Paradiso uses the same underlying technology that AJAX uses, HTML and JavaScript, and it still lives in the browser. This difference is that it plans to offer DOM storage, offline execution, and a synchronization model that will allow web applications to run in a partially or fully disconnected mode.

This reliance on a specific browser is what may ultimately sink Gran Paradiso. Unlike the cross-platform runtimes used by WPF/E and Apollo, which hopefully the users won’t have to think about, Firefox is a highly visible frame that takes away screen space from the application itself. And if the user prefers Internet Explorer, Safari, or Opera, they may be agitated about having to use Firefox.

The common theme throughout all of the new frameworks is a combination of XML and some form of JavaScript. Is JavaScript the next big langauge, or is this just a short term anomaly?

No comments :