views:

414

answers:

3

Has anyone used Lua for web development?

If so, what was your experience of Lua vs using Perl/Ruby/Python/PHP/etc

+1  A: 

I've used it as a scripting language for certain parts of a website before. I usually use ASP.NET/C# which is obviously a compiled language (as in, there's a separate compilation step) and using Lua for certain things allowed me to update bits of logic without having to recompile the whole site.

It doesn't make sense to do the entire website in Lua, though. Not because of any deficiency in the language itself, but simply because there's really no framework that would make it worthwhile.

Also, I'm not sure that there would be much benefit in using Lua in a PHP/Python/etc website where update a .php (or whatever) file would be just as easy to update as a .lua file.

Dean Harding
+2  A: 

I've heard good things about the Kepler Project as a Lua web framework ... though I've never used it nor Lua personally.

Greg
+4  A: 

There are quite a few web development topics at the Lua User's Wiki, see specifically the Network section of the Libraries and Bindings page for a list of low level and high level projects.

For a general web framework in Lua, Kepler is the usual advice. It stands between any of several web servers (including Apache) and the application-specific code. The Kepler Project is also the source of a number of bindings to interesting libraries that were needed to make Kepler work.

For a MVC framework on Kepler, there is Orbit.

For an example of a complete wiki and document management system based on Kepler, see Sputnik which can be customized and extended into a number of content management domains.

I used Kepler to provide remote access, monitor, and control of a PC-based embedded system, and had very little trouble getting it to do what was needed. That system has been sitting in a rack doing its thing for a couple of years now, without much further attention.

There are also several complete web servers implemented in Lua, falling back to C only for bindings to the platform-specific socket implementation.

RBerteig