Programming Languages and Tools

To build a dynamic website, you need a server-side programming language. There are many languages to choose from, all with their own strengths and weaknesses. To give you an example of their syntax, here’s the classical "Hello World" program for each of them.

PHP

PHP is now arguably the most popular language for web applications. It has a small learning curve, and is well suited for small and quick projects.

PHP is offered on virtually all hosting plans. The most common versions are PHP 4 and 5. If you are starting a new project, you should use the latest version.

<h1><?php echo 'Hello, world!'; ?></h1>

Perl

Perl was the most popular language for the Web before PHP. It still has a larger set of libraries. It remains a good choice for developing a new Web application today.

#!/usr/local/bin/perl

print "Content-type: text/html\n\n";
print "<h1>Hello, world!</h1>\n";

Ruby

Ruby is becoming more and more popular for Web applications thanks to its framework Ruby on Rails, known as RoR. However, Ruby and Ruby on Rails are two different features. Some web hosting plans include Ruby (served as CGI), but not Ruby on Rails.

#!/usr/bin/ruby

puts "Content-type: text/html\n\n";
puts "<h1>Hello, world!</h1>\n";

Ruby on Rails

Ruby on Rails has been praised as a new development paradigm for Web applications. Ruby itself is a nice language to work with. If you want to deploy an application using Ruby on Rails, make sure that your plan includes Ruby on Rails - and not just Ruby.

class HelloController < ApplicationController  
	def index  
	render_text "<h1>Hello, world!</h1>\n";	
	end
 end  

Python

Like Ruby, Python is a relatively new comer. The language is more modern than Perl, especially for object-oriented programmation. This language is a good candidate if you want to learn a new language.

#!/usr/bin/env python

print "Content-Type: text/html\n\n"
print "<h1>Hello, world!</h1>\n";	

Java

Java, developed by Sun, is mainly used for large scale applications. Its target is the enterprise market. Only a few web hosting companies offer Java, since it requires more resources for small projects.

class helloworld
{  
	public static void main(String args[])
	{
		System.out.println("Content-type: text/html\n\n");
		System.out.println("<h1>Hello, world!</h1>");
	}
}

Server Side Includes (SSI)

Server Side Includes are not exactly a programming language, but rather a set of commands. Server Side Include, as their name suggests, are a tool used to easily add external files inside an HTML page

They are particularly useful for keeping the header and/or footer of a website identical. Using SSI, you can modify a single file to change the footer/header on all pages.

<!--#include virtual="/path/file.html" -->

FrontPage Extensions

FrontPage from Microsoft used to be a very popular software to build websites. With the release of Office 12, Microsoft abandoned FrontPage.

FrontPage comes wit a set of proprietary built-in scripts (hit counters, data collection, etc.) to create dynamic sites. These scripts require Frontpage extensions on the server to run. You need the FrontPage extensions on your web hosting plans only if you make use of these scripts. Otherwise you can use Frontapge and deploy your web site on any plan.

Get all the articles

blog comments powered by Disqus

News

09/05/2010
Yahoo! Special Offer
Yahoo! Web Hosting - Save 35% off for the first 3 months
08/12/2010
Coupons for Cool Handle
Get 20% off on shared Linux hosting with coupon chauglnx01 or 15% off on shared Windows hosting with coupon chaugwin01
07/30/2010
Network Solutions: Domains for $9.99
Domains for $9.99! Valid on new registration of .com, .net, .org, .biz, .info, .name, &apm; .us from 8/2/10-8/15/10 with code NSDEALS999.

Hot Offers

Latest Articles

Share This Page

Bookmark and Share

Short link:

Links