views:

204

answers:

5

Hello,

I'm building a new game and I need to build a web app to help manage content generation. The app would consist of a couple simple forms that would tie into a MySQL db.

I've been really interested in learning Lua for a long time due to it's large popularity in the video game industry and was wondering how well it works as a server side language. I could easily write the web app in PHP but I'd rather use this opportunity to learn Lua if it makes sense.

What do you all think?

Cheers,

+6  A: 

Sure it can be done. Good idea if you just want to learn Lua. You should start here: http://www.keplerproject.org/

Byron Whitlock
+1  A: 

Of course, if your app would consist of a couple simple forms, you can use all what you want. But if it is more complex (will become more complex in future) it will be better to use some industry standard languages like Python or Ruby (or, at least PHP), there are a lot of good frameworks writen in them that very simplify your work (I don't know about any complete lua web frameworks) . You should remember, that in future other people will have to maintain your code and there are very few web-developers who know Lua. Probably, there will be problems with documentation and basic libraries too.

Tiendil
The kepler project cited by Byron is the core of a complete web framework written (mostly) in Lua. There are several related projects that expand it in various directions.
RBerteig
A: 

Have a look at Nanoki which is built on a pretty minimal set of libraries (lfs, luasocket, lzlib, slncrypto)

and Sputnik which is built on Xavante or CGI

Doug Currie
A: 

While LUA is a nice language for embedded development but i would extremely vote against LUA for web development.

The reason is that in Games you simply don't have an external API. All is done with your own objects only some calls into your game engine.

But the web world is so full of stuff you need, like SMTP, POP3, IMAP, SSL, Amazon APIs, Google APIs, RSS Apis, Imaging etc. and while the checklist for LUA may have a check mark behind all this words - it doesn't mean anything. Most of the stuff i have seen is just a "me too| implementation but not industrial strength. They are projects by hobbyists and are published on a "Its good enough for me" basis which is total unacceptable if you ever go mission critical.

There is a reason why it takes years and a huge community to get this up. Lua has an extremely small community of web developers.

So if this is a professional project where you put your money i can only say hands off. On the other side if you have enough money i still have some snake oil here for sale, please contact me.

Lothar
Please don't write Lua in all caps: http://www.lua.org/about.html#name
Alexander Gladysh
A: 

Lua is a good language but it is best suited to embedding within an existing project in order to quickly extend the capabilities of that project. In particular, the interesting aspect comes with how you bind it to the host application. This is definitely the case when programming for games where it is an embedded language rather than the language the whole app tends to be written in. So using a web app to learn about Lua with a view to making games is probably not a very good approach, especially since the syntax is very simple and would be picked up quite quickly anyway.

Kylotan