CGILua
CGILua 5.0
Building web scripts with Lua
overview · download · install & config · scripts · reference · libraries · SAPI

Contents

Overview

CGILua is a tool for creating dynamic web pages and manipulating input data from forms. It is simple but powerful, allowing complex tasks to be carried out with minimum effort. Typical applications that can be developed with CGILua include, for instance, web based information systems accessing external data (databases) and gateways to existing systems.

CGILua uses the interpreted language Lua as a server-side scripting language for creating dynamic Web pages. Both pure Lua Scripts and Lua Pages are supported by CGILua. A Lua script is essentially a Lua program that creates the whole contents of a web page and returns it to the web server. A Lua page is a conventional markup text (HTML, XML etc) file that embeds Lua code using some special tags.

Lua scripts and Lua pages are equally easy to use, and choosing one of them basically depends on the characteristics of a specific page. While Lua pages are more convenient for the separation of content and format, where the format is usually manipulated with the help of a HTML editor, Lua scripts are more adequate for creating pages that are simple in terms of its HTML structure, but require a significative amount of internal processing.

Allowing these two methods to be intermixed, CGILua provides Web applications developers with great flexibility when both requirements are present. For a detailed description of both scripting methods and some examples of their use see CGILua scripts.

CGILua can use Java Servlet, ISAPI module, Apache module, FastCGI and traditional CGI. CGILua's architecture is divided in two layers. The lower level one is represented by the Server API (SAPI) and the higher level is represented by the CGILua API itself. The high level layer is implemented using only SAPI and is totally portable between the launchers. This way any CGILua script or CGILua page could be run by any launcher.

CGILua is free software and uses the same license as Lua 5.0.

Current version

Current version is 5.0 beta 2.

Download

CGILua can be downloaded in source code from the LuaForge page

What's new

Incompatibility with previous versions

Credits

CGILua 5.0

CGILua 5.0 was completely redesigned by Roberto Ierusalimschy, André Carregal and Tomás Guisasola as part of the Kepler Project. The implementation is compatible with Lua 5.0 and was coded by Tomás Guisasola with invaluable contributions by Ana Lúcia de Moura, Fábio Mascarenhas e Danilo Tuler. CGILua 5.0 development was sponsored by Fábrica Digital and CNPq.

CGILua 4.0

Ana Lúcia de Moura adapted CGILua to Lua 4.0, reimplemented some code and added a few improvements but this version was not officially distributed.

CGILua 3.x

CGILua was born as the evolution of an early system developed by Renato Ferreira Borges and André Clínio at TeCGraf. At the time there were no CGI tools, everything was done with shell scripts!

However, the main contribution was done by Anna Hester, who consolidated the whole tool and developed a consistent distribution with versions 3.1 and 3.2 (the number was an effort to follow Lua version numbers). This version was widely used on a great variety of systems.

Contact us

For more information please contact us. Comments are welcome!


$Id: index.html,v 1.36 2004/12/22 16:17:26 tomas Exp $