The OpenLaszlo Server

The OpenLaszlo Server is a Java servlet/JSP application. This server makes LZX application development process a breeze. You compile your code by directing your Web browser to the OpenLaszlo server. The server examines the URL and compiles the appropriate source code (LZX file). It then sends the generated output to the browser so that you can view your application. If compilation fails, the server sends a compile error, telling you which line or lines of code caused the error. If there is an error but compilation can continue, the server generates output and sends warning messages.

Because the OpenLaszlo Server is a servlet/JSP application, you need a servlet/JSP engine, which is more often referred to as the servlet/JSP container. You do not need to know about servlet programming to develop LZX applications, but you need to know how to install and run a servlet/JSP container.

There are several free servlet/JSP containers available in the market. Jetty and Tomcat are two of them. The developers of OpenLaszlo have chosen Tomcat as their servlet/JSP container, even though other products can also be used. Alternatively, you can use a J2EE application server to run the OpenLaszlo Server. A J2EE application server always includes a servlet/JSP container but is much more powerful than a servlet/JSP container. The following are examples of J2EE application servers.

  • BEA’s WebLogic

  • IBM’s WebSphere

  • Sun Microsystems’ Sun Java Application Server

  • Oracle’s 10g Application Server

  • GlassFish

  • JBoss

  • Jonas

  • Apache Geronimo

JBoss, Jonas, and Geronimo are open source application servers. They have different licenses, though, so make sure you read them before using the products.

The OpenLaszlo Server can be used in two different environments:

  1. As a development platform for easy and fast compilation of OpenLaszlo applications.

  2. As a deployment platform to rapidly dispatch and run OpenLaszlo applications.

Note that, albeit more difficult, you can also compile your OpenLaszlo scripts without the OpenLaszlo Server.

The architecture of the OpenLaszlo development platform is given in Figure 1.1. The diagram shows a client that requests output to be sent as a Flash file. For DHTML no Flash player needs to be present in the browser.

Figure 1.1. The OpenLaszlo development platform architecture


The development process can be summarized as follows. You write your code and save it as an lzx file in the specified directory. You then use a Web browser to send an HTTP request to the OpenLaszlo Server, which in turn compiles your code and generates a Flash file. The OpenLaszlo Server sends the Flash file to the browser and the browser automatically plays it.

Let’s now create an OpenLaszlo application to get the feel of the development process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset