Server-Side Web Languages Overview
The term 'Server-Side' simply refers to the fact that these are languages that 'run' or process at the web-server, as oppposed to languages that process locally inside your browser.
This is a very important distinction, as the vast majority of web services would not be able to function with only 'client-side' or local processing. The server is where data is stored, and just about every web application or service needs access to a considerable amount of data to process and report on.
These then are the most common server-side scripting languages in use on web-servers around the world.
CGI (Common Gateway Interface)
CGI scripts are often found on web servers for performing common tasks such as hit counters. CGI scripts are written in several languages but the most common is PERL (Practical Extraction & Report Language.)
Most web hosts provide a few scripts that you can simply install on your website, and there are many more available to download if you take a good look around the web.
PHP (Hypertext Preprocessor)
PHP scripts are programs that run server-side to control and affect the output of HTML and often work with MySQL databases. They run on Linux Apache or Nginx servers, as part of the LAMP/LEMP stack, which at over 60% of the installed web-server base, are the most prevalent in the world. PHP is reasonably easy to learn, highly accessible, and impressive results can be achieved quite quickly.
Many consider PHP to be one of the most effective but simple to learn web programming languages. It is certainly one of the most popular, and is used to create most of the Web CMSs (Content Management System) available - such as WordPress, Drupal and Joomla. It is also used by Wikipedia, Facebook and Digg.
A simple example could be:
echo 'Date: ' . date('d-m-Y');
echo '<br />';
echo 'Server Time: ' . date('H:i:s');
This example serves to clearly demonstrate three points:
- First, it is running at the server – which is why the time is the server time (the server could be located in a data centre on US Central CST time, or in the UK on GMT for example) and not your local time.
ASP (Active Server Pages) & ASP.NET
ASP scripts are Microsoft's equivalent to PHP pages. They process pages using the VBScript language and are interpreted line-by-line at the web server. ASP scripts run on Microsoft IIS web servers.
ASP.NET pages are a faster, compiled version of ASP, utilising Microsoft’s .NET framework. They carry the .aspx file extension.
PERL (Practical Extraction & Report Language)
Perl is one of the most popular languages for creating CGI scripts, and is highly effective at processing text. It is interpreted at run-time and not compiled, so it is easy to maintain.
Perl is actually a jack-of-all-trades, and is used in many different environments, as it was designed to be easy to use and practical from the programmer’s stand-point (rather than being easier for the interpreter or computer). It is a relaxed language and quite easy to pick-up for the beginner.
Although SQL (Structured Query Language) is not strictly a programming language, it is a highly complex (yet accessible) query language - designed to make it as easy as possible to interact with large databases of information. SQL is just as much at home with a small database of 1,000 products, as it is with Amazon’s portfolio of millions, and is massively scalable.
Most server-side programming or scripting languages will be fully integrated with MySQL, which is an open-source (free) installation. It is also part of the favoured LAMP/LEMP stack, incorporating Linux, Apache/Nginx, MySQL & PHP.
MySQL is now owned by Oracle as part of the SUN Microsystems purchase in 2009.