Weblogs: Javascript

Web applications with Ajax, XUL and Flash

Tuesday, September 27, 2005

Andy Budd shares a light bulb moment about developing web applications with Flash. Flash is proving to be a very respectable choice for such applications, and competing head to head with technologies like Ajax and Mozilla's XUL.

The death of Java applets

Flash is maturing exceptionally well, it survived the blinking lights and moving graphics kindergarten phase. Java applets failed on this first teething hurdle, and died very quickly thereafter. True, there are isolated occurrences of applets still in use today - one example I am aware of is a live share trader's share price monitor, but that's the exception rather than the rule.

When Java applets died so did the hope of web-delivered applications. Thankfully we have a resurgence of interest in "distributable applications". The idea of being able to do your normal work using any computer with a net connections, and still have your own personal desktop is becoming less of a pipe-dream and more of an achievable reality.

The scope of web applications

Its true that applications like Photoshop and CAD will be incredibly difficult to implement within a web capable container, but do we really need that? I've never used either application, and I don't believe either ranks highly as an everyday tool for most people running around in big businesses.

The benchmark for web applications will always be Microsoft Office. Or rather, the fraction its functionality that is genuinely useful to a large number of users. Once you have a web-delivered application that delivers that sort of feature set, then a totally web-based desktop environment becomes a very practical option.

Ajax Office applications

During September 2005 I've come across a number of references to Ajax Office - a bold attempt to do just that. Also, there's an application called Writely which is a simple word-processing capable application that fits nicely as an alternative to Microsoft Word in terms of typical office documentation.

Ajax desktop applications

Ajax is making serious inroads into productivity applications. A common application these days are web desktops that allow you to monitor other people's news feeds and add in a few different features. For example Google's Personalised Home, Microsoft's skunk-works project Start.com, and more recently, Net vibes. They are almost frameworks for additional functionality than just a plain old news feed reader or email summary.

Resurrecting the portal

Looking at these "personal desktop applications" its obvious that Ajax has brought the portal back into vogue. Portals died with the dotcom bust, also the emergence of Google destroyed Yahoo's and Altavista's portal visions. Ajax offers a breath of life to portals in that they are immediately more useful to the visitor. This is largely due to the interactivity, immediacy and customisability of the current crop of Ajax portals.

Ajax mind share

Ajax has dominated the web application arena for the last year. Well ever since James Jesse Garrett first coined the term for a concept that's been largely ignored over the last five years. Its got the lion's share of interest at the moment, but it needs to prove itself before alternatives like Flash and XUL start inheriting the mind share.

The one strength Ajax has is that its based on reliable web standards: The W3C gave us HTML, CSS, XML and DOM, and ECMA giving using JavaScript (or more technically correct EcmaScript). Its a wonderfully natural combination of technologies, especially for people involved in developing and supporting e-commerce applications.

Flash web applications

Flash is a capable platform that compares adequately to Ajax in terms of web application features. Behind the scenes, the workhorse is ActionScript which also has a direct lineage to EcmaScript. Flash supports XML, as well as transferring XML between the client and server. So a server-side component designed to talk to Ajax clients can also talk to Flash clients without modification.

Does Flash have an advantage over Ajax? Flash probably has the upper hand when it comes to the range of web applications it can implement. Flash applications will probably be more usable and user friendly than its Ajax equivalent, owing more to its past uses as a glitzy presentation interface. A good demonstration of the potential of Flash applications is kosso's podbat podcasting application.

Flash's disadvantages lie in its development tools. Yes, Macromedia Flash is known to be an extraordinary rich development tool, but its expensive. Are there any serious alternatives? One that's catching the spotlight at the moment is Open Laszlo which focuses specifically on web applications.

Thankfully, Flash isn't lacking in accessibility. With the dedicated efforts of Bob Regan and Andrew Kirkpatrick, the structure for building accessible Flash components is there, and improving almost everyday.

XUL web applications

I think XUL applications is going to be a hot topic next year. One project in particular will offer the underpinnings - XulRunner. I've been watching this project over the last year, when it started off as a project to have just a framework for building XUL applications - which a stack load of useful components. Recently, a very interesting milestone has been added: rewrite Firefox as a XulRunner application!

That's either breathtaking audacity, or the simple fact that XulRunner is seriously underrated. Either way it is an exciting scenario. If Firefox becomes installable as a XulRunner framework plus the Firefox application, that solves the chicken-and-egg situation that made Java applets untenable. No-one really wants to install a multi-megabyte plugin for a browser just to run perhaps one application. But when your browser runs inside this platform, no extra bits are needed.

XUL and Ajax

The technology behind XUL is almost identical to Ajax. Except the structure of the front end can be done in HTML, or XUL, or a combination of both. Like Ajax, XUL uses JavaScript, CSS and DOM. XUL and Ajax are so closely aligned that switching between the two is far easier than trying to get your head around Flash.

XUL and Ajax score major points over Flash because it requires nothing more than a text editor to develop an application. (In terms of deployment, XUL probably would require a zip application like WinZip). Flash scores on its user interface capabilities which easily outperforms HTML and CSS.

Desktop widgets

Another web application area that's seen an incredible rise of popularity is that of desktop widgets. These are tiny applications that sit on the users desktop doing small tasks like checking for new mail, checking the local weather, football scores and the ubiquitous news ticker.

Konfabulator started things off by taking the Mozilla framework and building the first desktop widget framework. It received such a positive reception that Apple cloned the idea and created their Dashboard widgets. KDE has a similar application called Karamba, and Microsoft have recently jumped on the bandwagon with Microsoft Gadgets. Another step forward for desktop widgets was Yahoo's recent purchase of Konfabulator.

The surprising feature of these desktop widgets is that they are typically nothing more than HTML (or XML if you prefer) along with CSS and JavaScript, along with a smattering of XML (or JSON) for data transfer. Everything that comprises a typical web-based application. The Flash equivalent is probably OpenLaszlo again.

Conclusion

At the moment Ajax is all the rage. It makes sense for developers to learn how to produce Ajax-capable applications or front-ends. When XUL takes off, Ajax developers will find the migration much easier - its just learning a new simple XML markup language. Ajax developers will also find the transition to writing desktop widgets easier too. In short, Ajax is hot, and the skills it needs are reusable in other frameworks and applications.

Flash is the up-market alternative. ActionScripting should be fairly straightforward to pick up given that an Ajax developer already knows JavaScript. Tools like OpenLaszlo will help the Ajax developer, and hopefully that is sufficient enough to produce useful web applications. Flash suffers because of the higher learning curve and the cost of de facto development tools.

XUL is the future.


Further reading


[ Weblog | Categories and feeds | 2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 ]