General Database question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
General Database question
Hi Guys
I was reading all i could about using a middleware to access the databases and i have a question
how exactly would you request the info from the middleware in a way that is secure
it seems to me that it would be the same case as connecting to the database directly
am not looking for code examples. My background is web development so i have never needed to use the middleware since our databases are
behind firewalls with rules that only let the sql servers talk to the servers where the web pages are hosted
thank you in advance.
Edd
I was reading all i could about using a middleware to access the databases and i have a question
how exactly would you request the info from the middleware in a way that is secure
it seems to me that it would be the same case as connecting to the database directly
am not looking for code examples. My background is web development so i have never needed to use the middleware since our databases are
behind firewalls with rules that only let the sql servers talk to the servers where the web pages are hosted
thank you in advance.
Edd
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: General Database question
Your web pages include SQL commands? No PHP on the server?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: General Database question
yes they include sql commands
the thing is that i check the session status on all the pages before actually executing the queries
that way i keep it secure
how the process would be done in live code.
am interested in making a complete middleware package so i dont need to write code over and over
on another note, i read everything you post, they are a good source of information
thanks for your quick response and all the time you spend helping the livecode community (am sure you get this all the time)
Edd.
the thing is that i check the session status on all the pages before actually executing the queries
that way i keep it secure
how the process would be done in live code.
am interested in making a complete middleware package so i dont need to write code over and over
on another note, i read everything you post, they are a good source of information
thanks for your quick response and all the time you spend helping the livecode community (am sure you get this all the time)
Edd.
-
- Livecode Opensource Backer
- Posts: 366
- Joined: Tue Apr 10, 2012 9:18 am
Re: General Database question
I think what Richard is getting at is that if you are using PHP, you are using middleware.Your web pages include SQL commands? No PHP on the server?
In the case of Livecode, there is Livecode server, which you can set up on your webserver and use it much like PHP. Or, if you are using Livecode to create an application that will not live on your server, then you can send your requests to some middleware on your server (such as PHP or Livecode Server) and that will output your data back to your application
There are different ways to encrypt and/or encode that data (to and from the server), so that your middleware will have keys or password or salt and can de-crypt/de-code your query, get your requested data, re-encrypt/re-encode it and send it back to you.
Here is one thread about this:
http://forums.livecode.com/viewtopic.php?t=23812
Is there a specific project you are working on, or are you just exploring ideas?
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: General Database question
Thank you for the kind words, Pistris. Now I have to see if I can live up to them.
PHP is the most common solution for middleware, and there are innumerable tutorials for using it with MySQL.
LiveCode Server can also be used in that role - these Lessons may help you get started:
http://lessons.livecode.com/m/4070
Bonus points: if you don't already have an SSL cert on your server, it's never been easier now that the Let's Encrypt project is here - completely free with automated renewals once it's set up:
https://letsencrypt.org/
Some shared hosts like Dreamhost provide support for Let's Encrypt, and hosts using CPanel will have support for it there next month.
If you're using a dedicated host or VPS running Ubuntu, the latest version (16.04) now provides Let's Encrypt through its package repository, so it can be installed via the normal package manager, apt-get.
PHP is the most common solution for middleware, and there are innumerable tutorials for using it with MySQL.
LiveCode Server can also be used in that role - these Lessons may help you get started:
http://lessons.livecode.com/m/4070
Bonus points: if you don't already have an SSL cert on your server, it's never been easier now that the Let's Encrypt project is here - completely free with automated renewals once it's set up:
https://letsencrypt.org/
Some shared hosts like Dreamhost provide support for Let's Encrypt, and hosts using CPanel will have support for it there next month.
If you're using a dedicated host or VPS running Ubuntu, the latest version (16.04) now provides Let's Encrypt through its package repository, so it can be installed via the normal package manager, apt-get.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: General Database question
Hi Richard
By reading my own post i think i answered my question
i guess what i need to know is how to communicate securely
how to post data to my web pages securely from within livecode (IOS)
Thanks
By reading my own post i think i answered my question
i guess what i need to know is how to communicate securely
how to post data to my web pages securely from within livecode (IOS)
Thanks
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: General Database question
Use https instead of http. If your server is properly configured the rest just works.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: General Database question
ok so dumb question then
all i need to do change is
post myData to URL "http://www.address.com/mypage.html"
for
post myData to URL "https://www.address.com/mypage.html" ?
all i need to do change is
post myData to URL "http://www.address.com/mypage.html"
for
post myData to URL "https://www.address.com/mypage.html" ?
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: General Database question
As long as the server is set up for HTTPS, yep, that should do it.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: General Database question
Thank u
Am gonna try it tomorrow.
Am gonna try it tomorrow.
Re: General Database question
IS the hosting account that comes with the livecode account already setup with ssl certificates and ready to use HTTPS ?