GEOG5870/1M: Web-based GIS A course on web-based mapping

Server Side Technologies

Introduction to Server-Side Technologies

The first half of this course focussed heavily on client-side technologies such as HTML, CSS, Javascript and existing Javascript libraries. These technologies are named as such because they are performed by the client in the client-server model. A client is a piece of software (usually a web browser) which operates on the local system and makes Hypertext Transfer Protocol (HTTP) requests to a server as necessary. Client-side technologies can be faster and safer than server-side technologies; however they are limited in functionality and cannot interact with permanent storage such as a database. If your web-application requires permanent storage, for example you want users to add to an existing dataset or pull information that is stored centrally, server-side technologies are required to complete these processes.

LAMP web-service solution stack

The term 'server-side technologies' can encompass a range of software solutions, mainly: server-side scripting languages; Database Management Systems (DBMS); web server software such as Apache; and many other technologies depending upon the application being built. The essential combination of technologies required to build a service is known as a 'software-solution stack' and the original and most commonly used web-service software solution stack is known as LAMP (An acronym for Linux, Apache, MySQL and PHP). The components of the stack are interchangeable and hundreds of other acronyms exist to encompass different technologies (WAMP uses Windows for example, MAMP uses Mac OS X). It is worth noting that the stack must include four components: a operating system; a web-server instance; a database management system and a server-side scripting language.

For the purposes of this part of the course, the software solution stack we are using is Linux, Apache, PostgreSQL and PHP. We will use these technologies create a web solution whereby data can be extracted from a database and returned to web mapping library for visualisation. We will cover each of the stack solution components in greater detail, but for now, it is important that you understand the client-server relationship and how these different technologies are involved. Let’s imagine how the Facebook log-in process works:

  1. The Facebook login URL is entered in a web browser address bar which initiates a HTTP request from the client machine to Facebook’s server which is running the Apache web server software.
  2. Upon receiving the request, the Facebook Apache Server responds with a HTTP response containing a static webpage containing a log-in form.
  3. Log-in credentials are entered and the 'Submit' button is clicked calling (probably) some Javascript validation. The credentials are passed to a PHP which establishes a secure connection to the Facebook server-side Database Management System using a query language such as SQL.
  4. Once a secure connection has been established an SQL query is called which checks if the user-credentials match a user in the database. If so, a series of server-side processes occur to compile the user profile and display it in the browser. If not, PHP returns an error and the user is asked to try again.

Now we have looked at how these technologies interact with one another let’s look at some of the components in greater detail, we can then consider how our web-map solution will be constructed.

[ Next: The Apache HTTP Server ]