Backbase widgets work wonders

Mature AJAX toolkit rewards learners of BXML with highly interactive Web clients

One fertile area of programming today is the AJAX (asynchronous JavaScript and XML) toolkit. The buzzword may only be a few months old, but everyone seems to instinctively know that a nice library or toolkit will make it much easier to build sophisticated JavaScript-based clients that run in a basic Web browser. The Amsterdam-based Backbase has been building its library since long before the buzzword arrived and continues to produce some of the more sophisticated results on the market.

Backbase Web clients are amazing. The company offers several customizable examples that make it simple to spin up a Web page with objects to drag and drop. One example lets you create four windows with news and weather in them. They float in the browser like real windows float in an OS. It’s no stretch to say you could create a complete Mac-like interface in just a few lines in the HTML file.

About that HTML file: Backbase pages have an HTML suffix and the Web server treats them as such, but these files actually bear little likeness to HTML. They do contain familiar HTML tags, but the most sophisticated Backbase files are filled with Backbase’s own version of XML called BXML.

Much of the work in Backbase development requires joining together these XML tags. The libraries may be written in JavaScript, but you don’t need to use this JavaScript for very much. Instead, you’re more likely to build up XML descriptions of the Web pages and the actions that happen when events occur.

Extraordinary HTML
For instance, a Backbase Web page includes a link tag that starts off with an ‘a’ like a standard link, but it includes unfamiliar attributes such as b:action=‘load’ or b:url=‘window-01.xml’ or b:mode=‘aslastchild.’ These are parsed by the Backbase libraries and interpreted by them.

Many of the tags have no resemblance to HTML. The actions are linked to events by creating an <s:event> tag and filling it with <s:task> tags, not by writing JavaScript. There are <s:task> tags for all of the major changes that can be made in the Web page, such as selecting some text in a field. The result is a well-structured hierarchy of XML.

The good news is that the Backbase architects have a talent for elegant solutions, unlike the cluster of committees that produced the current mess called JavaScript. The event mechanism is straightforward and the XML provides a good amount of discipline.

The bad news is that you can’t do much with your hard-earned knowledge of producing cross-browser JavaScript. The API is, for most intents and purposes, an entirely new language. It’s smaller, cleaner, and crisper, but it’s still new. If you’re fed up by the lack of consistency in JavaScript, you’ll enjoy the rigidity of Backbase. Still, some JavaScript coders will resist Backbase, because it can’t be learned incrementally.

There’s no arguing with the results, though. I built several Web pages and modified some of the built-in examples. It’s simple, for instance, to create a very swish store by editing a few XML files that describe the objects. Several of the Backbase examples like to separate the data from the display logic. You don’t even touch the HTML or JavaScript; the Backbase code parses the XML to get the information about the items for sale. The coding is filled with XPath logic, which will make XML lovers happy.

Back and Forth
The pages themselves are highly interactive and responsive. Click on items, and the Web page morphs to describe them or sell them without triggering an AJAX lover’s worst nightmare: the interminable loading of a new Web page. If you purchase something, the Backbase code drops an item in the shopping cart simply by rewriting the HTML. You can even set up a page to let you drag things to a shopping cart -- a wonderfully intuitive touch that has always eluded Web designers.

The code even shows flashes of brilliance. There were several moments when I was pleasantly surprised by the raw power of the mechanism. My favorite detail may be the built-in debugger that pops up floating windows when you hit the escape key. You view internal data structures such as the BXML DOM or trace the events that get fired. When the code is finalized, you disable the debugger to lock out users and save downloading time.

Such sophistication, however, may cause confusion among the users of the Web apps you produce. Most people are conditioned to expect the pause between Web pages, and they understand that it means that information was successfully sent to a distant server. They understand that a transaction doesn’t happen until that crucial HTTP POST operation. Backbase developers must always keep in mind that users may not understand where the browser begins and ends, especially when the JavaScript in the browser is creating its own windows.

This confusion will certainly fade as AJAX developers find the best new tools and users grow accustomed to the results. Backbase’s collection of AJAX tools is outstanding, and the clean and friendly look and feel of Backbase apps will help bring about this new consciousness.

InfoWorld Scorecard
Value (10.0%)
Capability (30.0%)
Ease of development (30.0%)
Performance (15.0%)
Documentation (15.0%)
Overall Score (100%)
Backbase 3.0 8.0 9.0 9.0 8.0 7.0 8.5