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!