Introduction to Server Side Languages
In previous weeks, you have seen examples working with HTML. HTML allows you to format a page so that it appears on the client computer in a way which you specify.
Types of Server Languages
In the web, we also have server side languages. These languages run anything from a few simple lines of code to complex programs, on the server, and generate an HTML page to be sent to the browser. There are several popular server languages which you may see mentioned from time to time:
- ASP.Net - This is from Microsoft and is designed to run on Window's servers. It's advantages include a familiarity among developers who already program in Microsoft's .Net environment, and easily connecting to their existing libraries to allow easy database access, and moving of programs from a desktop to a web environment.
- PHP - A very common language which can be run on almost any server. PHP has been around for years and it is easy to find on-line resources for the language. It makes many tasks very easy to perform, as it doesn't require extensive knowledge of object-oriented programming to work with PHP. Almost all web servers include PHP in their hosting packages.
- Python - Has become popular in recent years and works equally well as a server side language for the web, as it does for scripting on the desktop to automate tasks.
- Ruby - Has been around for a while, but found new popularity recently with the Rails Framework (why you often hear of Ruby on Rails). Makes many complex tasks fairly simple, but does not work well on shared hosts.
- JSP - Based on the Java Language, and part of the Enterprise Framework, it allows Java programmers a way to develop for the web. Allows for easy access to databases, encryption, and more, if you are familiar with Java and Object-Oriented programming.
What a Server Language Can Do
Regardless of language you may find or use, all server side languages allow you to perform some of the same tasks.
- Be able to handle input from forms - The server needs to be able to take information which an end user enters, and be able to process it according to what we want to do with the file (see below).
- Work with external files - With a server side language, you can import a file to display or run, as well as write out a file to create a new file or update an existing file.
- Access a database - While the databases supported may not be the same, server side languages allow you to access a database to quickly and easily store, update, and retrieve data. Most languages support many different databases, and we will look at some of those coming up.
- Communicate with other Systems - The simplest version of this, is communicating with an email server to send emails. However, access to other systems may be available as well via messaging, network protocols, and/or SMS messaging.