Application to Server Framework

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Application to Server Framework

Post by ghettocottage » Tue Jul 07, 2015 9:58 pm

Recently I have been working on desktop database applications that connect to a remote MySQL server using LC Server as an intermediary.

Everything is working. I have the latest stable version of LC Community Server. I can send queries to my remote database and get the results in my desktop app.
I have some encryption in place when sending my queries. I am working on encrypting the returned data. Reading lots of forum posts and getting some good thoughts and ideas. Great Stuff!

As I am working on this, I have started wondering if there is a community developed framework in place for app to server to database connections? Surely this is a common enough thing that a basic framework would give us a starting point when making a new project?
I am aware of revIgniter, but (as far as I can tell so far) this is more specific to writing web-apps or websites than using it as an intermediary between apps and a database.

Does anyone have something like this? Or know where one is available? I like what I am coming up with, but I am sure it will be a work in progress for some time before it is ready for prime-time. Maybe I should put my work on git as a starting point?

Some things that would be cool to have:
user authentication
data encryption both ways
a few simple query functions

I am getting 2 and 3 nailed down, but have not started thinking through user authentication yet, as it is not pressing since all my projects are for specific people who will be using this on specific computers with specific databases...but I can see this being a need soon if any of my apps are to be used on a wider scale.

AxWald
Posts: 578
Joined: Thu Mar 06, 2014 2:57 pm

Re: Application to Server Framework

Post by AxWald » Sun Jul 26, 2015 4:19 pm

Hi,

this sounds good to me. If I understand correctly (not native English ...) you're talking about a LC server script or LC standalone that can be used as "middleware"?
And can be configured using a prefs file or a substack?

I have something comparable running as a faceless service on a Win server. It acts as middleware between the web server PhP and the in-house databases. *1)
Too bad that, as so often, I didn't have the time yet to nicely clean up the code, translate my comments, kick unused code and compile at least some docu ... :/
(If you'd like a q&d cleaned up version, drop me a line. GPL V3.)

I think such a project would be very helpful, could be done as a community project (once a brave person could lead it), and I'd like to help within my limits.

Have fun!

*1) Features:
  • Reads .txt preferences files
  • Writes .txt logs
  • Uses sockets only
  • Has a basic User Auth (with an own .sqlite, and all credentials hashed & salted)
  • Uses a set of defined commands to do certain things
  • Is a basic Standalone and uses a normal stack where the cmd logic is
    (so that you only need to change the stack/ prefs & restart the SA)
All code published by me here was created with Community Editions of LC (thus is GPLv3).
If you use it in closed source projects, or for the Apple AppStore, or with XCode
you'll violate some license terms - read your relevant EULAs & Licenses!

ghettocottage
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 366
Joined: Tue Apr 10, 2012 9:18 am

Re: Application to Server Framework

Post by ghettocottage » Sun Jul 26, 2015 5:16 pm

Hi @AxWald
.. you're talking about a LC server script or LC standalone that can be used as "middleware"? And can be configured using a prefs file or a substack?
Yes, more or less. Your description is close to what I am thinking about. Basically, there would be some .lc files on the server, and then a stack or, as you mentioned, a simple .txt file for preferences that would live with the application being built.

Basically, it would be a simple framework for interacting with the server. User authentication would be nice, but might need to be built into the database? Which makes me wonder if this framework would also need an SQL file to create a user-table...

Everything being passed to the server and back would be encoded and encrypted.

I could put something up on github to start with. Keeping in mind that it would need quite a bit of work.

Post Reply

Return to “CGIs and the Server”