Review: Canoo UltraLightClient Takes a New Approach to Java GUIs

ava recently celebrated its 10th birthday at JavaOne in San Francisco. It’s come a long way in that time, and a decade is a long time in technology. It’s a measure of its success, and of its great original design that it hasn’t had to change a great deal, language- and architecture-wise, over that time. Of course what you have today may look a lot different from what you had 10 years ago, but these are as a result of evolutionary steps, rather than revolutionary steps.

One place where it was challenged 10 years ago, and is still challenged today is in the presentation layer?in the facility to easily develop the richest user experience possible. The original Java had the AWT, which took a lowest-common denominator approach to allow for cross-platform ease. This of course led to problems when users of operating systems wanted functionality that was specific to that operating system, and the lowest-common denominator approach couldn’t handle that. For example, Windows users are used to two buttons on their mouse?the right button for context menus. But this couldn’t be handled in a cross-platform way, as the Macintosh only used one button, and AWT had to handle both.

Through a succession of frameworks such as Swing and AWT, Java certainly improved, but hasn’t reached critical mass in the development of rich, performant UIs, which are still the realm of Microsoft developers.

In addition, the trend pendulum has continually swung between the light client, that may have a lesser experience but is easy to deploy and maintain, and the rich client, which is more difficult to deploy and manage, but easier to use. Examples of the former have led to innovations around technology such as DHTML and CSS, and the latter has led to the continued evolution of Visual Basic and ActiveX towards .NET Windows Forms.

Figure 1. Minding the Storefront: The Canoo ULC implementation of an online store allows lots of nice client-side customization.

UltraLightClient from Canoo attempts to put Java back into the GUI picture by taking a best-of-all-worlds approach, starkly in contrast to the AWT least-common-denominator approach. In a nutshell, it involves a deployed ‘engine’ at the desktop that services components that are streamed off a server. This makes it quite similar in scope to XML UI services such as XUL and XAML, but, as it is a pure Java implementation, is potentially easier to manage.

Components are coded and built using Java to create innovative ‘half-objects.’ The client half of an object provides the display, user interaction and communication with the server. The server half provides the proxies to middleware and business logic. This could lead to a massive productivity boost, and potentially a performance boost relative to the XML UI technologies. No comparison for performance was made as part of this review, but, the architecture is clearly there to allow for some pretty high-performance applications.

But all this architecture isn’t really worth anything unless you can create a good-looking GUI to place in front of your clients. This is where the UltraLightClient really excels. Take a look at Figure 1 and you’ll see a pure Java implementation of the full UI for an online store.

This GUI comes as part of the samples installed with Canoo?and as you can see it is pretty rich indeed. All panes may be resized and stretched according to user Preferences, the performance is smooth and quick, and multiple color schemes and mouse operations, such as right-click context menus are supported.

How Does it Work?
ULC is based on a presentation server development paradigm, where the business logic (such as managing the state of a shopping cart) and the presentation logic (such as managing the state of user selections on a list) run on the server, and the user interface display status (such as list widths and relative sizing) are handled on the client. This is done to minimize server round trips as much as possible. So for example, if you make a list selection and want the UI to update accordingly, it should only have to request information?not presentation, from the server. It handles presentation on its own, reducing bandwidth and increasing performance. It does this through an innovative half-object design paradigm, where essentially half of the object runs on the server, and the other half on the client!

This also helps with scalability and portability of applications, as should you need to move across servers, that support different versions of the servlet framework or Struts, you have no problems?the client engine handles all the UI and visual presentation and your server infrastructure just delivers information to it.

You should also consider the expense of the traditional HTML-based thin client, and the complexity of having to mix technologies such as DHTML, CSS, JavaScript, and more to produce any kind of rich experience. With Canoo you can write GUI applications in about half the time that use about 10 percent of the bandwidth of the traditional HTML-based light client.

This is the value proposition of Canoo?a cost-effective best-of-all-worlds approach that can give you rich GUI from pure Java code, managed by a commercial-grade presentation engine.

Writing Code for UltraLightClient
Once installed, ULC, comes with a wealth of documentation, which is useful, but the documentation is in PDF format, which is a bit of a drag. It would be much nicer if it was in an easy-to-manage format, such as Help files, or at least HTML. (There is an HTML-based JavaDoc format API documentation, but everything else is PDF.)

Coding ULC is like coding any other Java GUI, requiring amany lines of code for the simplest task. If you are an experienced Java GUI coder with Swing or other APIs you’ll take to it like a fish to water. As an example, the header box from Figure 1 above requires this code:

ULCBoxPane result = new ULCBoxPane(4, 0);        result.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));        result.add(ULCBoxPane.BOX_LEFT_EXPAND, new ULCLabel(IconFactory.getIcon(Constants.LOGO_ICON)));        result.add(ULCBoxPane.BOX_LEFT_EXPAND, new ULCLabel(IconFactory.getIcon(Constants.TITLE_ICON)));        result.add(ULCBoxPane.BOX_EXPAND_EXPAND, ULCFiller.createGlue());        result.add(ULCBoxPane.BOX_RIGHT_EXPAND, new ULCLabel(IconFactory.getIcon(Constants.CANOO_ICON)));        return result;

Should you want a code generation tool, based upon a Visual Editor, Canoo offers an Eclipse-based one for an extra fee.

If you have to develop and maintain a Web-based application (and who doesn’t nowadays) you will have doubtless encountered many design debates over fat vs. thin clients and endlessly evaluated the advantages and disadvantages of each. ULC from Canoo offers an innovative best-of-both-worlds solution that could be perfect for your needs. It isn’t perfect: the documentation could be better and an integrated visual design environment would be handy, but it is certainly an innovative solution that is worth checking out. It is quite unique and difficult to compare with any other GUI toolkit because of the nature of its ‘half-object’ approach, but you can download an evaluation from http://www.canoo.com/ulc and see if it suits your needs.

UltraLightClient costs $1,499 per seat (developer).

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: