HTML5 and SQL database

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
agraham147
Posts: 50
Joined: Thu Apr 19, 2018 6:18 am

HTML5 and SQL database

Post by agraham147 » Tue Jun 29, 2021 2:01 pm

Hi everyone,

I'm in the process of creating an application which I want to deploy as a Livecode HTML5 Web App. I want my app display data from a SQL database I have set up on my hosting account (cPanel), but I've been made to believe that Livecode web apps don't support SQL database connections. Is this true and how can I code my web app to retrieve data from my database. I'm sorry to say that this is the first time I have tried web based applications and I'm not that experienced in how some things work, although I am happy to learn.

Any help would be greatly appreciated!
Thanks, Aaron

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

Re: HTML5 and SQL database

Post by FourthWorld » Tue Jun 29, 2021 5:51 pm

Common industry practice is to protect the DB engine from the open Internet by using an intermediary layer on the server to provide a public-facing API. These often use REST style, but just about any reasonable HTTP access will do.

PHP is the most popular solution for this, though Perp, Python, Node.js, and many others can be used, even LiveCode Server.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

agraham147
Posts: 50
Joined: Thu Apr 19, 2018 6:18 am

Re: HTML5 and SQL database

Post by agraham147 » Tue Jun 29, 2021 8:13 pm

Hi Fourth World,

Thank you very much for your reply. Unfortunately my knowledge and understanding is somewhat limited when it comes to web development. Do I create an API using Livecode Server and are there any examples or tutorials for me to learn? Also, once the API has been developed, does that mean my HTML5 web app will be able to connect to my database on cPanel?

Sorry for all of the questions, I'm just really keen to understand how this works so I can create my end goal.

Thanks,
Aaron

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”