Lua Server Pages, LSP for short, is a blinding fast general-purpose scripting language that is well suited for Web development and can be embedded into HTML. LSP supports the latest Web development techniques such as WEB 2.0 applications, Ajax, and Web-Services.
LSP is powered by the powerful, light weight programming language Lua and is comparable to the speed of a compiled language such as C++. As an example, a XML parser designed in Lua is just as fast as a XML compiler designed in C code.
|
|
Designing Web Services in LSP is simple. You declare your Lua functions as web-services, which instantly makes these functions available to a client Bindows application. The Bindows JavaScript application calls the server side functions as if the functions were local JavaScript functions in the client.
The initial load time for WEB 2.0 applications can be slow on many servers. We solve this problem by storing deployed applications as zip files. The zip file does not need to be uncompressed by the server as the server can directly mount the ZIP file as a file system. Files inside the ZIP file are sent compressed directly to the browser, thus reducing the browser load time by a factor of 3.
LSP Example: A Basic Web Counter | |
|
<html>
<!-- A basic LSP hit counter -->
<body>
<?lsp page.count = (page.count or 0) + 1 ?>
<h1>You are visitor <?lsp=page.count?></h1>
</body>
</html>
|
Compare the LSP example to this PHP example. Which one is easier? |