CGI Scripts

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
MrWizard.
Posts: 32
Joined: Tue Apr 17, 2012 3:31 am

CGI Scripts

Post by MrWizard. » Fri Jul 19, 2013 2:45 am

Can CGI scripts be compiled or must they be in plaintext and runtime interpreted?

E

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8418
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: CGI Scripts

Post by FourthWorld » Fri Jul 19, 2013 6:39 am

Are you looking for speed or security?
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

MrWizard.
Posts: 32
Joined: Tue Apr 17, 2012 3:31 am

Re: CGI Scripts

Post by MrWizard. » Fri Jul 19, 2013 12:52 pm

Generally load / execution speed but also security around IP protection especially where one has to embedd plaintext passwords for database connections

E

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8418
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: CGI Scripts

Post by FourthWorld » Fri Jul 19, 2013 3:43 pm

LiveCode is, as its name implies, a dynamically-compiled language, so there is no method by which we can compile to pure object code. In this regard it's very similar to other popular server scripting languages (Python, JavaScript, Perl, PHP, etc.), so I think you'll find the performance at least on par with those.

Data security is always a good concern, and you have as many options as those using other server scripting languages, such as keeping sensitive data outside the site's root folder, storing it with encryption, etc.

And with LiveCode you have at least two additional options:

If you're using the Commercial Edition of the server engine, you can include password-protected libraries which can be called from your scripts. A password-protected stack is stored on disk encrypted, making it a good option for sensitive data which may be included in scripts.

Another option might be to consider a Linux standalone as a CGI, but as much as I've enjoyed that for some specialized deployments I'll admit it's more work to set up, and lacks the syntactic sugar of the Server's implied "merge" functionality that makes using LC Server such a joy.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

edgore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 197
Joined: Wed Jun 14, 2006 8:40 pm

Re: CGI Scripts

Post by edgore » Fri Jul 19, 2013 9:23 pm

I would second putting anything sensitive (passwords etc) into a config file in an access restricted folder outside of web server root and having the script load it as needed.

This is also a good thing to do with anything configuration related - anything that might have to be updated (paths, urls for services you connect to, etc) can be stored outside of the script, allowing you to easily change it as needed, without having to go in and modify the script. I keep all my stuff separated like this and it makes maintenance much easier.

Post Reply

Return to “CGIs and the Server”