I've noticed that quite a few people come to Ozzu asking about the best way to create dynamic, content-driven websites. After being told to use a server-side scripting language, their next question is almost always about which one to use.
Hopefully this will help clear up a few things and help people to make a choice.
PHPWebsite: http://www.php.net
Cost: Free (Open Source)
License: PHP LicenseSyntax: C-like, similar to Perl
API: PHP ManualPHP is one of the most widely-used scripting languages because a) it is free, and b) it is easy to learn.
PHP has extensive
API documentation and built-in functionality for many common tasks.
A simple
Hello World script in
PHP might look like this:
<html>
<head>
<title>PHP Hello World Demo</title>
</head>
<body>
<?php
$greeting = "Hello World!";
echo $greeting;
?>
</body>
</html>
- <html>
- <head>
- <title>PHP Hello World Demo</title>
- </head>
- <body>
-
- <?php
- $greeting = "Hello World!";
- echo $greeting;
- ?>
-
- </body>
- </html>
Most Linux-based hosting packages provide
PHP support as a basic part of any plan. To set up
PHP on your own computer for development purposes, you can either install
PHP itself,
available here, or use an all-in-one package that sets up a complete Apache,
PHP, and MySQL environment, such as
WAMP.
To begin learning
PHP, check out the following:
PHP Resources for Tutorials, Books, Script Archives, etc.PHP TutorialsASP.NETWebsite: http://www.asp.net
Cost: Free
License: Microsoft
Syntax: Varies
API: MSDNASP.NET is also relatively easy to learn and costs nothing to run on a server.
A simple
Hello World script in ASP.NET might look like this:
<html>
<head>
<title>ASP.NET Hello World Demo</title>
</head>
<body>
<% Response.Write("Hello World!") %>
</body>
</html>
- <html>
- <head>
- <title>ASP.NET Hello World Demo</title>
- </head>
- <body>
-
- <% Response.Write("Hello World!") %>
-
- </body>
- </html>
ASP.NET is used widely on Windows-based hosting packages. ASP.NET uses (and thus requires) the .NET framework. To set up ASP.NET on your own computer for development purposes, you can install the .NET framework and ASP.NET,
available here.
To begin learning ASP.NET, check out the following:
ASP.NET TutorialsASP.NET: Getting StartedQuickStart TutorialASP.NET tutorial at W3SchoolsColdFusionWebsite: http://www.adobe.com/products/coldfusion/
Cost: $1,299 USD (developer's edition is free)
License: Adobe
Syntax: XML-based
API: CFML ReferenceColdFusion is used in many enterprise-level web applications. It integrates tightly with other Adobe technologies and platforms such as Flex and
AIR. To install and run ColdFusion on your own server, you'll need to purchase a ColdFusion license from Adobe. A good number of hosting providers, however, provide ColdFusion support, often for only a few dollars extra on any hosting plan. Some even offer it free of charge.
Although a full-fledged ColdFusion license can be pricey, you'll likely only need the Developer Edition, which is free and allows you to develop ColdFusion applications locally.
A simple
Hello World script in ColdFusion might look like this:
<html>
<head>
<title>ColdFusion Hello World Demo</title>
</head>
<body>
<cfset var greeting = "Hello World">
<cfoutput>#greeting#</cfoutput>
</body>
</html>
- <html>
- <head>
- <title>ColdFusion Hello World Demo</title>
- </head>
- <body>
-
- <cfset var greeting = "Hello World">
- <cfoutput>#greeting#</cfoutput>
-
- </body>
- </html>
To set up Coldfusion on your own computer for development purposes, you can install the ColdFusion Developer Edition,
available here. (Adobe account required, free to signup)
To begin learning ColdFusion, check out the following:
ColdFusion Developer CenterColdFusion Tutorial and Article IndexPythonWebsite: http://www.python.org
Cost: Free (Open Source)
License: Python LicenseSyntax: C-like
API: Python Language ReferencePython is a general purpose scripting language often used to develop web applications. Python is arguably a more powerful object-oriented language than PHP, but the two languages are very similar, and learning one making learning the other easy.
A simple
Hello World script in Python might look like this:
greeting = "Hello World!"
print greeting
- greeting = "Hello World!"
- print greeting
Note that on shared hosting, Python scripts are usually run as
CGI programs. To set up Python on your own computer for development purposes, you can install the Python libraries,
available here.
To begin learning Python, check out the following:
Python DocumentationPython TutorialA Beginner's Python TutorialDive Into PythonRubyWebsite: http://www.ruby-lang.org/
Cost: Free (Open Source)
License: Ruby LicenseSyntax: Unique
API: Ruby Core ReferenceRuby is a newer scripting language that aims to focus on simplicity and rapid development. Ruby is often seen paired with the Rails framework, an
MVC framework built on Ruby for rapid application development.
A simple
Hello World script in Ruby might look like this:
<html>
<head>
<title>Ruby Hello World Demo</title>
</head>
<body>
<%
greeting = "Hello World!"
puts greeting
%>
</body>
</html>
- <html>
- <head>
- <title>Ruby Hello World Demo</title>
- </head>
- <body>
-
- <%
- greeting = "Hello World!"
- puts greeting
- %>
-
- </body>
- </html>
Ruby is not always available on hosting packages, so be sure to check with your hosting provider and ask for Ruby support if necessary. To set up Ruby on your own computer for development purposes, you can install the Ruby libraries,
available here.
To begin learning Ruby, check out the following:
Ruby DocumentationBasic Ruby TutorialThere are many other scripting languages that can be used to create dynamic websites. I've only listed some of the most common ones here. In addition to the languages themselves, many people often use a framework to aid in the development process. Popular
MVC frameworks include
Rails (for Ruby) and
Cake (for
PHP).