Sunday, May 11, 2008

OpenLaszlo: SWF9 or DHTML?

I am a fan of both OpenLaszlo and Flex. They share many similarities including XML grammar-based layout/presentation languages (LZX for OpenLaszlo and MXML for Flex) and ECMAScript implementations for logic scripting (JavaScript subset for OpenLaszlo and ActionScript for Flex). Both also provide Java developers easy and intuitive approaches to the Flash Player.

While there are many similarities between OpenLaszlo and Flex, a key difference between OpenLaszlo and Flex is the environment that applications written with each of these Rich Internet Application (RIA) are deployed to. Flex requires Flash Player 9 (SWF9) while OpenLaszlo currently supports (outside of beta support) Flash Players 7 and 8, but not Flash Player 9. Also, OpenLaszlo is probably best known for its in-progress support of DHTML starting with OpenLaszlo 4.1. Note that while OpenLaszlo applications are currently compiled to Flash Player 7 or Flash Player 8, they will still run on Flash Player 9. The disadvantage for OpenLaszlo applications compiled to Flash Player 7 or Flash Player 8 format is not that they won't run on Flash Player 9, but instead is that they won't be able to take advantage of performance and other benefits associated with Flash Player 9.

Because work is still underway to make OpenLaszlo compile to Flash Player 9 and to DHTML, an understandable question is which one is getting more attention and why is that deployment environment getting more attention. The blog entry Progress with Flash 9 Runtime indicates that the OpenLaszlo development team is making progress on targeting the Flash Player 9 runtime and the blog entry SWF9 Components Progress provides visual evidence of this progress with an attractive slider component. While the component is nice itself, the real value of this latter blog entry is that it shows off the "substrate" or infrastructure that is available behind the component for Flash Player 9.

In the last blog entry mentioned (SWF9 Components Progress), the feedback comments are almost as informative as the blog entry itself. A user going by "Tim" asks why the OpenLaszlo team is focusing on SWF9 support rather than on DHTML support (which is planned to be delivered with OpenLaszlo 4.1). The answer, as documented in another feedback comment, is that there is a partner helping pay for additional labor to enable OpenLaszlo to support Flash Player 9. While this is a sufficient and understandable reason to emphasize the Flash Player 9 support over DHTML support, I think it is a good decision anyway because of the advantages of the Flash Player 9. One of the primary complaints about Flash Player-based applications and RIAs in general is that they are too slow to load up. Much has been done to improve Flash Player 9's performance and I believe that OpenLaszlo should take advantage of this.

Of course, one of the most compelling features of OpenLaszlo for many of us is its ability to have applications run on DHTML. So, while I understand and even agree with the decision to focus on OpenLaszlo support for SWF9, I still look forward to OpenLaszlo 4.1 when DHTML support will be fully supported. One of the most tantalizing possibilities with OpenLaszlo is that all of the effort to rearchitect the product to support alternative runtimes may make it possible in the future to support other runtime environments as well. As of today, Silverlight and JavaFX seem like possible candidates for future runtime support.

Note that as of this writing (Saturday, 10 May 2008), OpenLaszlo is at version 4.0.12. This version includes significant DHTML support, though some functions are still not supported in DHTML until 4.1 is released. For SWF9 support (also a work in progress), a separate download (from a development branch) of OpenLaszlo is required.

No comments: