Embedded Systems – LUA vs Shell Scripting vs C for CGI-Scripting

cembedded-systemslinuxscripting

I am going to try CGI scripting for implementing a web based Graphical User Interface on an embedded device. What advantages does LUA scripting have over shell scripting or C for implementing dynamic HTML files? Which one do you think is easy-to-use from developer's perspective.

My GUI will comprise of some form based HTML pages. Some times, I would like a C program to run corresponding to an action performed on the GUI and then display result of the program to the user on GUI. Will shell scripting suffice in such a scenario or will I 'have to' use LUA? I have some experience with shell scripting actually.

Best Answer

You can code CGI in any languages, and actually there are CGI applications coded in C or C++, in Lua, in Ocaml, in Perl or Ruby, even in Bash.

My feeling is that for an embedded system, C is the best choice (because the binary program would be small, and there is no need to add an interpreter).

But the language choice is up to you.

Of course, you should be aware of the limitations of CGI. the CGI program should run quickly, and you should make it store explicitly (in file or database) any persistent data to be shared from one HTTP request to the next.

Related Topic