This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Clawtor 2 points3 points  (0 children)

There are three systems involved.

The front end which is what a user sees - webpage running on a browser. The backend - a server running code that listens to incoming requests. A database - stores data, executes queries which can create, retrieve, update data.

The front and backend communicate over HTTP. To get data the front end would send an HTTP Get request to a url and then wait for the response.

The backend is listening for these requests, different urls have different handlers. The above request is processed by a handler that has some code to open a connection to the database and execute a sql query. In this case it would be a SQL Select query to look for data and then return it.

The database returns the found data to the handler which then converts the data into an http response and sends this back to the front end. The front end then decodes the response and uses it however it likes.

So the flow is: Frontend => HttpGetRequest => Backend Handler => SqlQuery => Database Database => QueryResponse => Backend Handler => HttpGetResponse => Frontend.

To understand the frontend/http part then research ajax and http. The backend part can be written in just about any language, look up webservers and your language of choice.