Skip to content

Getting to know the OpenLaszlo platform

Over the last few days between revision and exams I’ve been learning and trying things out in the OpenLaszlo web platform. My main aim was to create an animated menu with categories, text and links defined in an XML data file. This proved rather straightforward and successful so I extended the scope of the project to allow for XML defined styling of the menu such as spacing and colors, as well as adding a run-time text resizing component. Below you can see an example of a compiled SOLO deployed version of the menu (this is OpenLaszlo’s compile once into flash or DHTML form of deployment).

I further intend to deploy the project as a full OpenLaszlo application which will allow for the creation of dynamic menus. There are many ways to facilitate this two way communication with a Laszlo application, and due to the XML structure of the data and styling used in this menu project it will be simple to implement.

I have chosen to develop an XML generating Java Server Page (JSP) which takes various parameters and creates the desired settings. I’ll then call this page from a server side app (probably Java based) which allows the user to chose various settings and downloads the XML itself and puts it directly into a database saved under a certain name. The menu when run can then retrieve the settings of a given name from another JSP page which retrieves the XML from the database.

E.g.  User changes settings & saves –> Java program creates XML from JSP & stores in database –> User choses to view a saved setting –> OpenLaszlo menu app sends query to JSP which creates XML from database stored XML –> Menu is displayed

Which all sounds a bit confusing but will basically allow for a user to create their own menus with unique headings, links and styling, save their settings and even download the compiled flash SWF.

This sort of rapid development from a simple menu into a menu building tool would not be possible if it wasn’t for the excellent structure and maturity the OpenLaszlo LZX language posesses. It naturally encourages modular program design without even requiring you to make a conscious decision about hown to develop a program. The allowance for object oriented classes means that you can develop versatile components, and there are many pre-existing components that can be built upon. For example in this instance, my text sizing component could be added to a library and easily deployed in a multitude of different applications.

I’m very impressed with the platform itself and even the support of the OpenLaszlo community forum which was useful when I was stuck with how to approach certain aspects of the program. In my humble but considered opinion, JavaFX would have to come a long way to surpass OpenLaszlo and as for Microsoft Silverlight and Adobe Flex – what more can I say than why pay?

It is also worth noting that the first OpenLaszlo release was before that of all the major RIA platforms. Obviously due to the open source nature of the project it needed some work, but it speaks volumes for open source development that we are now looking at a very well developed platform for developing and deploying Rich Internet Applications.

Leave a Reply