Mon. Jan 23rd, 2023

Uses, Applications and Implications of Server-side Scripting

Server-side scripting is code that runs on a web server. It is used to process data sent by a client request, in order to compile the information necessary to create the HTTP response.

Languages

Unlike client-side scripting which relies on JavaScript which runs within the user’s web browser, client-side script can be written in many different languages. This is possible because the code only runs on the web server – therefore, the target platform for the page is irrelevant.

Some languages commonly used for server-side scripting include:

  • C#
  • Visual Basic
  • PHP
  • Java
  • Python
  • Perl

Applications of server-side Scripting

Server-side scripting is used for data processing. Common examples of this include:

  • Connecting to a database, to either query it for information which will be returned to the client, or to update information based on values submitted by the user.
  • To connect to a machine hosting document storage (e.g. Dropbox) to allow users to retrieve and store documents online
  • To connect to third-party services, such as payment gateways, which enable a website to collect payment information and send this for processing, enabling sales to be made online
  • To convert data into another format – for example, generating pdf documents ‘on the fly’
  • For validating user credentials and determining whether they are authorised to view resources or not

Disadvantages of server-side Scripting

The code runs on a remote server, rather than the client. This means that there will always be a greater delay involved in running a piece of code on a server than client-side. However, the security and flexibility of what can be achieved with server-side scripting generally outweigh this.

Summary

Server-side scripting is incredibly powerful. Commonly, websites will use a combination of both server-side and client-side scripting, to combine the strengths of each: the wide range of processing that can be achieved using server side script, and the slickness and fast response of client side script.