Beyond
HTML: Tools for Interactivity
Tool #4: Cold Fusion, ASP and PHP
Allaire’s Cold Fusion is a server-side solution for creating interactive, database-driven
Web sites, as well as simpler built-in support for database queries. Cold Fusion
is an application server, meaning it works in conjunction with a Web server
to deliver Web applications, not just plain Web pages. You build Web pages that
include special tags, which must be hosted on an application server that supports
Cold Fusion. When a Web browser requests one of those pages, the application
server first interprets the special tags, replaces those tags with the results
of whatever calculations or database queries are specified, and then sends the
completed page to the Web server, which finally sends it to the browser.
Cold Fusion uses a tag-based language—you mingle normal HTML tags with those
of Cold Fusion Markup Language (CFML). CFML includes tags for querying databases
and outputting text, and interacting with other Web services such as email.
Instead of ending your filenames with .htm or .html, you use the .cfm extension
instead.
Microsoft's Active Server Pages (ASP), is a popular competing Microsoft product
with similar functionality. Like Cold Fusion, ASP involves writing Web pages
with mixed HTML and scripts. In ASP, those scripts can be written either in
Microsoft's variation of JavaScript, called JScript, or in VBScript. ASP requires
Netscape 4.x or above or IE 4.0, and works best with IE 4.0 and above.
PHP is a popular open-source tool with similar functionality, based on scripts
embedded within HTML docouments. PHP distinguishes itself from both Cold Fusion
and ASP in that it is entirely free.
Browser Support
- Cold Fusion and PHP do not have any browser limitations, unless you combine
them with JavaScript.
- If ASP is run on the server side (most common), it is browser independent.
If it is tied in with VBScript for client side applications, it is dependent
on users viewing pages in IE.
What can these tools do?
Create dynamic data-driven web sites:
- Interact with databases
Example--University Programs Council Short Courses (ASP - Access Db)
http://web.virginia.edu/upc-sc/courses.asp
choose dance category, click on the + next to Irish Dancing
Example--ITC Software Central (PHP - MySQL Db)
http://www.itc.virginia.edu/desktop/central/
Choose Windows 2000 Software, WS_FTP and Winzip Software Links
- Create guest books, shopping carts, and order entry systems, including credit
card processing
Example--
- Interact with a combination of Database and LDAP directory service (ASP
- Access Db - LDAP)
Example--ITC Research Center's statistical software license registration page:
https://www.web.virginia.edu/rescomp/ldb/login.asp
Login with your SSN and Last Name
Pitfalls
- Creating Cold Fusion or requires a strong understanding of both relational
database design principles and HTML coding—a big leap for either database
designers who haven’t done much web work or web designers who haven’t built
many databases
- Cold Fusion and ASP require hosting on special servers that have application
server support—these are available at UVa, but require special accounts and
in some cases, fees for hosting.
- Cold Fusion, ASP and PHP all require creating a relational database in another
product— these products serve as the front-end of a web database, not as
the database itself. All interact with a number of database formats, including
Access, Sybase, Oracle, SQL Server and MySQL.
- ASP is currently a PC-only solutions. PHP is commonly
used on the UNIX platform, and Filemaker Pro is an option for Mac web database
support.
Effect on System Performance
- Complex queries can slow response time.
Cold Fusion Resources
- ITC provides a Windows 2000-based Cold Fusion Application Server for instructional
content delivery, research, and departmental projects:
http://www.web.virginia.edu
- The introductory book favored by Cold Fusion professionals:
The Coldfusion 4.0 Web Application Construction Kit, by Ben Forta
- Macromedia has an extensive site, with help from experts, tutorials, and free
downloads:
http://www.macromedia.com/software/coldfusion
ASP
Resources
- ITC provides a Windows 2000-based ASP Application Server for instructional
content delivery, research, and departmental projects:
http://www.web.virginia.edu
- ITC offers an Introduction to ASP course:
http://www.web.virginia.edu/DOTWeb/itccourselist.cfm
- There is a whole cottage industry of ASP books on the market:
http://www.aspobjects.com/ASP_Books_Media/
- Microsoft has an extensive site, with help from experts, tutorials, and
free downloads:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/activeservpages.asp
PHP
Resources
- ITC offers PHP Application Support on many of it's UNIX servers, including
www.people.virginia.edu
http://www.itc.virginia.edu/desktop/web/php.html
- There are a wide range of PHP books available on the market:
http://www.php.net/books.php
- Extensive PHP support on the web is available at:
http://www.php.net
Additional Web
Database Resources
ITC's Desktop Computing Support group maintains documentation on various
Web database tools, including Cold Fusion, ASP, and PHP at: http://www.itc.virginia.edu/desktop/web/database/.
You can see code examples of coding the exact same functional page in each
of these three tools.
Introduction | Tool
Types
JavaScript | DHTML
| CGI/Perl
| Cold Fusion | Java