This may be slightly stale news to folks who keep their ear to the wire, but the Laszlo folks announced last month that they are planning on supporting DHTML as a compilation target some time this year. The current release of their Laszlo Presentation Server 3.2 supports compilation to Flash SWF6, SWF7 and SWF8. The next version (code-named "Legals", likely 4.0) will support compilation to DHTML and SWF9. You can also read their wikified current plan. If nothing else, you should check out the DHTML demo application to see what Laszlo will be capable of.

What Is Laszlo? Laszlo is an open source, object-oriented, XML-based user interface language. That sounds like a mouthful, but you can think of it as similar to Mozilla's XUL, Microsoft's XAML and Adobe's MXML. Laszlo is supported by Laszlo Systems.

The file format (LZX) is written in XML, where you declare your User Interface objects/widgets/views. LZX uses JavaScript to provide the functional bindings/scripting for the applications using one of three techniques: 1) Global script using the <script> tag (similar to HTML, SVG 1.1), 2) Methods using the <method> tag (similar to XML Events, SVG 1.2), these methods are local to the individual XML objects that have been declared and 3) using constraints (this technique is somewhat like a cross between declarative and procedural programming). An example of constraints in use might be:

<canvas>
  <window resizable="true">
    <button width="${this.parent.width/2}">Some Button</button>
  </window>
</canvas>

When the window width changes, the button's width will also change. This is an example of a constraint. One challenge in Laszlo programming is to understand when to use global scripts, when to use methods and when to use constraints.

Laszlo also has a <drawview> tag that acts something like the HTML canvas tag, allowing vector graphics to be procedurally generated while allowing functionality (event listeners) to be bound. It would be nice if a future version of Laszlo would support declarative vector graphics as well (embedding SVG elements directly in LZX of course).

I also wonder if LZX could be integrated with CSS. A lot of work went into CSS and it would be a shame not to try and leverage that across the web developer base. The challenge is that CSS came from the need to separate the presentation/design from the content. There are many benefits to this, not least of which is that the designer skillset is different than the developer skillset.

Currently presentation can be mixed heavily with content and functionality in LZX, though these can be delineated by carefully dividing your application into libraries that contain design elements (classes, fonts, other resources) and keeping these libraries separate from the actual application (i.e. the LZX files that actually instantiate these objects). Personally, I don't believe separation of content, presentation and functionality need be perfect in an application. What's really required is for the designers, content producers and developers to have a sound software architecture that avoids excessively strong coupling between the disciplines, but that still allows them to work closely together. The best apps are those that appear seamless in terms of content, functionality and design.

Anyway, the move towards different compilation targets for Laszlo is great news. I see this as a bold strategic move in the web client development space. Personally, I think it's the next wave - we have been moving away from the document-based approach of traditional HTML programming for quite awhile now. Using a higher-level language that gets compiled into something "lower level" is not a new concept, even in the web development space. Anyone who has programmed a non-trivial web application using PHP plus SQL plus XSLT plus XHTML plus CSS plus JavaScript plus SVG will realize that we need to move up the stack.

As for other compilation targets, we know that Laszlo has future plans for the Windows Presentation Foundation (WPF). I hope that SVG will one day be in their sights as well. In the past, I've been leery of looking into OpenLaszlo simply because LZX compiles only to Flash format, even though they are open-source and even though I think the idea of Laszlo is quite sound. This illustrates to me how easy it is to become an "open standards" zealot and put the blinders on. The fact that the W3C Web Applications Working Group is looking into one of the existing four XML UI markup technologies (XUL, Laszlo, MXML and XAML) is promising.

§245 · April 4, 2006 · JavaScript, Laszlo, RIA, Software, SVG, Technology, Web, XML · · [Print]

Comments are closed.