Marketing for Libraries Logo

Website Management Section: Server-Side Technology

When you want to process information quickly or develop a dynamic website, it's a good idea to explore the "server-side" possibilities. Server-side technology requires special software on the web server, but it allows some interesting possibilities. CGI (Common Gateway Interface), PHP, ASP (and the newer ASP.NET), Adobe ColdFusion and JSP (JavaServer Pages) are all server-side scripting languages that allow web developers to handle a wide range of data and present information dynamically.

Services and Tools

Before jumping into a project be sure you have the services and tools you'll need for your server-side activities.

Server Software. Before selecting a technology, check with your web server service provider to determine whether you have access to any of these server-side technologies. Ask specific questions such as: Is my web server PHP-enabled? Many service provider now make these services available. However, if the answer is no, you can install software such as Apache on your own computer.

Editing Software. You won't need any new software on your computer. Your text editor (i.e., WordPad, TextEditor), HTML editor (i.e., BBEdit), or web development software (i.e., Dreamweaver) will work fine for creating scripts.

FTP Software. You'll need to upload your scripts to the web server. You can use your standard FTP software for this activity.

Like JavaScripts, you write simple or complex scripts to perform specific functions. However unlike JavaScripts that are written and executed within an HTML document, PHP, ASP, CGI, and other server-side scripts are stored on the host computer and executed as separate files on the host server. When you visit a website, your requests for information are processed by these scripts stored on the web server. For example, a web page may ask for your name and password. The PHP script would then locate your name in a database and display your customized personal page. Or, you might fill out a form on a web page and a CGI script might be used to store your information in a database on the web server. If you want to search this database, another CGI script might be used to process this request and display the search results. As you can see, server-side applications are what make websites powerful, customized tools.

Why hassle with server-side applications if they require special software and set-up? The reason lies in your website goals. If you'd like to develop customizable, dynamic pages, you really need this technology. If you'll be dealing with information collected through online forms, stored on databases, and organized on pages dynamically, you'll be frustrated working with XHTML and JavaScripts.

Rather than trying to explore the entire range of applications on a single page, we'll explore the basics. Then, use links and book resources for additional information that might be helpful in your decision whether to use these tools.

This page contains four elements: ASP, CGI, PHP, and Cold Fusion.

ASP

ASP stands for Active Server Page. The newest version is known as ASP.NET. Although you may choose to use ASP, consider PHP first. ASP.NET requires an understanding of VBScript, C#, and other programming languages.

ASP runs on Windows web servers and is a feature of the Microsoft Internet Information Server (IIS). Microsoft recommends the use of the server-side ASP rather than a client-side script. Typically, the script in the web page at the server uses input received as the result of the user's request for the page to access data from a database and then builds or customizes the page on the fly before sending it to the requestor.

ASP.NET (originally called ASP+) is the next generation of Microsoft's Active Server Page (ASP), a feature of their Internet Information Server (IIS). It allows a web site builder to dynamically build Web pages on the fly by inserting queries to a relational database in the Web page. ASP.NET is different than its predecessor in two major ways: it supports code written in compiled languages such as Visual Basic, C++, C#, and Perl. It also features server controls that can separate the code from the content, allowing WYSIWYG editing of pages.

Although ASP.NET is not backwards compatible with ASP, it is able to run side by side with ASP applications.

readRead!
Read Active Server Pages from wikipedia for an overview.

ASP & ASP.NET Basics

Developers can create an ASP file by including a script written in VBScript or JScript in an HTML file or by using ActiveX Data Objects (ADOs) program statements in the HTML file. The HTML file is named with the ".asp" file extension. ASP.NET files can be recognized by their .aspx extension

Learn More

There are many excellent books and websites available on this topic. You might wish to start with the following, easy-to-use texts:

Parnell, Ryan & Martinez, Joel (2003). ASP.NET Development with Dreamweaver MX: Visual QuickPro Guide. Peachpit Press. ISBN 0321146425

ASP Tutorial from W3 School

ASP Tutorial from Basic to Advance

Additional Resources

ASP 101

ASP Resource Index

DevGuru

INFO: ASP.NET Roadmap at Microsoft

 

CGI

CGI (Common Gateway Interface) remains a popular technology for building server-side applications. However, the programming can be complex. Unless you plan to simply re-purpose scripts, you'll need skills in Perl or C to be success.

readRead!
Read CGI from wikipedia.

Learn More

CGI Standard from W3

SCGI - replacement for CGI

 

PHP

When developed in 1994 , PHP stood for Personal Home Page. Later it was changed to Hypertext Preprocessor. The "pre" refers to how PHP handles information before it becomes HTML. Because PHP is a server-side technology, software must be available on your web server for you to use PHP. PHP can be thought of as "dynamic HTML pages" because content will vary based on the results of interpreting the script.

This script language and interpreter is freely available open source and used primarily on Linux Web servers. Because it's free and easy to use, it has become a popular alternative to Microsoft's Active Server Page (ASP) technology.

Why choose PHP over other tools for building dynamic websites? Many developers find PHP easiest to use. It's also free and cross-platform. It's become popular with both hobby and professional web designers, so there are many online materials to support its use.

The official website for PHP is located at http://www.php.net. You can also locate lots of great resources at http://www.zend.com.

readRead!
Read PHP at wikipedia for an overview of PHP.

PHP Basics

A PHP script is embedded within a web page along with its HTML. Before the page is sent to a user that has requested it, the web server calls PHP to interpret and perform the operations called for in the PHP script.

In a couple paragraphs, I'll try to provide an overview of the basics. Keep in mind that PHP documents end with .php file extension. However some servers may require the .php3 or .phtml extension instead. You use tags just like XHML, but you use question marks within the start and end tags such as <?php and ?>. Also keep in mind that the scripts will only function on a PHP-enabled server.

Here's a quick way to test whether your ISP web server is PHP enabled. Create a simple document with the following text. Save it as practice.php. Upload it to your web server. Then, open your browser and try the file such as http://eduscapes.com/arch/practice/practice.php.

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"DTD/xhtml1-transitional.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text-html; charset=iso=8859-1" />
<title>Practice with PHP</title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>

If php is enabled, you should see something on your screen like the following graphic.

php in browser

Let's explore some basic PHP terminology.

Variables. You use variables as storage containers for data. You use a $ in front of a variable name. The name must be letters or begin with an underscore _. Do not use spaces. Variables are case sensitive. Stick to lower-case as a good habit or squish words together and capitalize the first character such as $LastName. Putting a number of things together is called a string. Enclose strings in single or double quotes. If you have a series of separate things, they are called an array. Variables might remind you of using a database and mail merge program.

Let's look at an example.

<?php

// My pet
$yourfirstname = "Annette";
$pet = "cat";
$petname = "Kelsey";

//Print pet information 
print "$yourfirstname has a $pet named $petname.";

?>

Go the Pet page for the result. It's not very exciting, but imagine if you were accessing a pet hospital's website looking for a playmate for your cat! Okay, it's silly, but this is how websites like Amazon, eBay, and all the other database driven websites work. 

Forms. Much of the power of PHP comes from the use of forms to collect information that can be stored and searched later. The skills you already have in creating forms in XHTML can be applied to developing forms here. You just add a PHP script that deals with the information that is generated.

The best way to learn PHP is to explore print and online resources. Also consider using Dreamweaver. PHP commands are already built in making it easy to use.

Databases. PHP is often used along with database server tools such as the open source software called MySQL

Learn More

There are many excellent books and websites available on this topic. You might wish to start with the following, easy-to-use texts:

Ullman, Larry (2004). PHP for the World Wide Web. Second Edition. Peachpit Press. ISBN 0-321-24565-2. This book also has a great companion website.

Ullman, Larry (2003). PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide . Peachpit Press. ISBN 0-321-18648-6

Another alternative is to right to Adobe and make use of their many great resources for ASP.NET and PHP. They also have some great manuals.

Other Resources

PHP: Land of Code

PHP Builder - Great for ideas

PHP Definition - Definition and background information

PHP Home - The offical website of PHP

PHP Tutorial - Great tutorial to learn the basics at W3 schools

 

Cold Fusion

Adobe's ColdFusion allows developers to build powerful web applications and web services with less training and fewer coding skills than ASP, PHP, and JSP. ColdFusion works along side the other Macromedia web development tools. The best way to learn about this application is to go directly to Adobe's website. A 30 day trial is available.

readRead!
Read ColdFusion from wikipedia for more information.

Learn More

ColdFusion Cookbook

ColdFusion Resource Portal

 


| eduscapes | IUPUI Online Courses | Teacher Tap | 42explore | About Us | Contact Us | © 2006-2013 Annette Lamb & Larry Johnson