Connecting HTML5 webapps to MySQL databases


#1

Whats the best way to connect a HTML5 webapp to a MySQL database to fetch data?
I've read that using Javascript is not secure.


#2

well, you can't use html to fetch data from a database. Your javascript assumption isn't correct, there is also serverside javascript (nodejs), which so far i know is just is roughly just as secure as python (django) and ruby (ruby on rails), you can also use php.

You can make ajax (ajax + jquery if you like) request to server to fetch data, many sites use this feature (facebook and twitter to give two examples)


#3

Regarding security, the simplest way you can add more security is to encode the data before you send it from the client and then to use SSL while making any request to the backend.

All modern web applications work in a multi-tier manner with each part of the backend in separate places all connected via end-points which is usually an IP address or a domain name. To write an end-to-end web application, you would need a server software that can connect to the MySQL database and send data back to the client. If you can send the data to the server in an encrypted fashion, the server can send the response back over the same channel. Using AWS or any enterprise level cloud platforms for that matter, you can host servers securely behind a firewall and other layers of protection.

If you are still not convinced, kindly post the points that you think are important for you to develop the application and one of us can provide an answer.


#4

most likely, she is not going to configure her own server, but do shared hosting. Beside, this topic is more then >5 months old, don't revive it. Thank you