An OpenLaszlo test page is provided, and you can access it by typing the following URL into the browser: localhost:8080/lps-4.0. 10/exampleslhello.lzx.
This results in the string "Hello Laszlo'" appearing within the browser after a few seconds. The first time, OpenLaszlo takes a while to load, but subsequent reloads are as quick as a flash. Ask your browser to view the HTML source, and a perfectly formed page of HTML is displayed, albeit missing a little human-readable white space.
The output produced is created by an OpenLaszlo application, written in a declarative, XML-based programming language called LZX. Here's the source code to hello.lzx, which is pretty much run-of-the-mill XML: <text>Hello to Linux Journal from Laszlo! </text> </eanvas>
This simple example illustrates an important point about OpenLaszlo. OpenLaszlo's programming language is declarative in nature, not procedural. What this means is that you specify what you want OpenLaszlo to do as opposed to specifying how OpenLaszlo is to go about performing what you want done.
OpenLaszlo then works out the series of steps Lhat need to be performed and performs them for you. (In a way, this is exactly like how regular expressions work, in that you specify the pattern you are looking for, not how to find it.) So, when you program OpenLaszlo, you declare the behaviour you require in LZX, and you write LZX in XML. Hard-core programming types might think that writing code in




Reply With Quote
Bookmarks