Web Development

Build Web applications once, run everywhere with OpenLaszlo

OpenLaszlo provides a platform for building rich Internet applications that may mimic desktop application functionality. Here's a closer look at OpenLaszlo's features, architecture, language, and development environment.

Developers face many architecture choices when building Web applications. The target client is often a key factor when deciding which development platform to use. OpenLaszlo can help you clear this hurdle by delivering a runtime that runs on all browsers. OpenLaszlo provides a platform for building rich Internet applications that may mimic desktop application functionality. Here's a closer look at OpenLaszlo's features, architecture, language, and development environment.

Multiple runtimes

The OpenLaszlo feature that makes it stand out from other development platforms is its output; that is, the current version of OpenLaszlo can spit out Flash or DHTML. OpenLaszlo applications are written in XML in a language called LZX.

LZX compiles any of several runtime targets, including Flash 7, Flash 8, and native browser JavaScript (which runs within a standard browser with JavaScript support). The Flash 7/8 option generates a Flash file (swf) to run in the Flash player that runs within a Web browser.

An appealing aspect of generating Flash or DHTML is the lowered cost of client installations. OpenLaszlo facilitates the creation of zero-install Web applications, as users have everything necessary to run an application already available in existing browsers. Delivering an application developed with OpenLaszlo is as simple as pushing a file to a client.

You may think Flash and DHTML are enough for browser clients, but there is an ever-expanding market of handheld/wireless devices. With that said, the team behind the OpenLaszlo platform promises to support other client runtimes with future product releases. A good example is the Java Platform, Micro Edition, which is gaining OpenLaszlo support by way of active participation from Sun Microsystems.

The architecture

OpenLaszlo provides two options for building and delivering applications: proxied mode and solo mode. Proxied mode is when applications may be developed to take advantage of the OpenLaszlo Server. This server platform is written in Java, and it can be used to deliver code to the client, handle application communication, and so forth.

Solo mode allows you to build self-contained applications, which include the Flash or DHTML files generated by OpenLaszlo. There is no need for the OpenLaszlo Server. These self-contained programs can run without any network server. In fact, you can even deploy them as desktop applications.

LZX language

The LZX language is used to write OpenLaszlo application source code. LZX is XML with embedded JavaScript. These programs may include reusable component libraries and resources in various formats such as audio, images, SWF vector graphics, animations, movies, fonts, rich text, and XML data.

LZX is compiled into an OpenLaszlo program via the compiler included with the OpenLaszlo SDK. It compiles LZX files into executable binaries for targeted runtime environments like Flash or DHTML.

If you're using the proxied mode for application delivery, the OpenLaszlo Server provides a compiler that translates text LZX programs, libraries, and binary resources into binary SWF files that the Flash player can execute directly.

Development environment

The OpenLaszlo SDK is available as a free download from the OpenLaszlo Web site. The current version is 4.0.8. In addition to the SDK, you need the latest Java Development Kit to use OpenLaszlo. The LZX language is XML based, so you may use your favorite text editor to develop LZX code before running it through the compiler.

First impressions

The XML support within OpenLaszlo left the biggest impression on me. Its powerful databinding support allows you to take any standard XML document and quickly build a user interface around it. Also, it is great to generate Flash applications without working with the FLEX language. The size of the generated Flash files seems a bit large, but this may be due to my lack of experience with the platform.

The installation and setup of a development machine was not as complicated as I anticipated, although I have become accustomed to setting up new tools and environments. The command-line interface could turn off some users, so a graphical IDE like the Eclipse offering is appealing.

A key aspect of becoming familiar with a new technology is documentation. The OpenLaszlo site offers extensive documentation for developers and administrators, but it can be difficult to follow. There is a lot more help available online; for instance, you may want to check out Manning Publications' Laszlo in Action.

The point of OpenLaszlo is to insulate you from platform dependencies and support zero-touch installs. It meets this goal with the delivery of DHTML and Flash that runs in most Web browsers. Like other development platforms, OpenLaszlo will require you to spend a considerable amount of time getting familiar with it and becoming proficient with building applications. The use of XML does lower the barrier to entry for OpenLaszlo development.

Do you use the OpenLaszlo platform? Are you interested in using such tools to facilitate Web development? Share your experience and thoughts with the Web Developer community.

Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.

---------------------------------------------------------------------------------------

Get weekly development tips in your inbox Keep your developer skills sharp by signing up for TechRepublic's free Web Developer newsletter, delivered each Tuesday. Automatically subscribe today!

About

Tony Patton has worn many hats over his 15+ years in the IT industry while witnessing many technologies come and go. He currently focuses on .NET and Web Development while trying to grasp the many facets of supporting such technologies in a productio...

9 comments
Tony Hopkinson
Tony Hopkinson

and it looks just like the past. Flas,h javascript embedded in XML, write applications with DHTML. Bleh.

bjries2
bjries2

Is OpenLaszlo a niche technology, or is it too little too late? I myself first found out about OpenLaszlo about a year ago, and at that time thought that it sounded great. Like it had potential as an alternative essentially to Flex. However, since Silverlight has come out, I wonder just how much need there will be for the OpenLaszlo "alternative"?

Jaqui
Jaqui

since all website scripting language options are build once run anywhere. well, except for activex. to bad it's clientside scripting, that is nothing but a critical security risk and should be illegal.

jspurbeck
jspurbeck

Any development platform that hides the implementation details and provides a robust data handling mechanism is a great step forward in our everchanging target environment. However, any user experience that depends on Flash, or flash-like (non-DHTML) plugins is a move "away" from the ideal. OpenLaszlo on the server makes sense, as long as the user's browser is not forced to install, or depend upon, Flash. Let's not get lazy. Build the user's experience with 100% CSS/Javascript, and push the common css/js files to the client. Feedback, please ... Jerry

antonbar
antonbar

I would say that OpenLaszlo doing not bad at all considering the number of successful applications built on it and the recent investment. One example of a large web application build on OpenLaszlo is http://G.ho.st.

antonbar
antonbar

I think you did not understand how it works. What's so bad or insecure in the regular client Java Script? Without it you wouldn't even be able to post here.

kunalashar
kunalashar

The article itself is just a "this is what OpenLaszlo can do" post. Its aim seems to be to raise awareness of OL rather than contrasting OL with other tools. So the comments posted here seemed out-of-place. I was hard-pressed to find a well-informed comment on OpenLaszlo on this post. Except for a couple of insightful comments, the rest seem shallow. I'm heading a team of developers in developing a rather complex web app, and I was looking for intelligent, experienced comments on OL. OL wasn't my first choice. I've developed equally complex apps using TIBCO's General Interface product. I was hoping that someone here may have used something else and would have some useful experiences that I could contrast with.

antonbar
antonbar

OpenLaszlo actually supports both, DHTML and Flash, so it's your freedom of choice as application developer or host.

Tony Hopkinson
Tony Hopkinson

This site would use something else, say server side...... The bad and insecure has nothing to do with javascript, it's the browser / OS that stops it being used to access the local file system for instance, or the registry....