home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


CHAPTER 34
Using ColdFusion

by Eric Ladd

In this chapter
What Is ColdFusion? 880
Installing the ColdFusion Application Server 882
Using the ColdFusion Administrator 883
The ColdFusion Markup Language (CFML) 896
CFML Tags 897
CFML Functions 921
Using ColdFusion Studio 928

What Is ColdFusion?

With the soaring popularity of dynamically generated pages created from server-side databases, it should come as no surprise that many software tools have emerged to assist Web developers with the programming required to produce such pages. Software of this kind is often called middleware because it acts as an intermediary between the Web server software and the target database.

One middleware product that has proved to be immensely popular with developers is Allaire’s ColdFusion. References to chemistry aside, ColdFusion is an application that runs on the same machine as your Web server. Figure 34.1 shows an overview of how ColdFusion works with your Web server. The major steps in the delivery of a ColdFusion based page are

1.  A user requests a file containing ColdFusion code (called a ColdFusion template) or submits a form that has a ColdFusion template as its ACTION attribute.
2.  The Web server hands the template over to the ColdFusion Application Server for processing.
3.  The ColdFusion Application Server parses out the programmatic instructions, makes all necessary calls to server-side databases via Open Database Connectivity (ODBC) drivers, performs any required data manipulation, and then prepares an HTML document as its response to the server.
4.  The HTML document is returned to the Web server which, in turn, sends it to the user’s browser.


FIGURE 34.1  This diagram illustrates how ColdFusion works with a Web server and other services on your server.

You give instructions to the ColdFusion Application Server through the ColdFusion Markup Language (CFML), a tag-based language that you embed inside HTML code to produce a ColdFusion template. In addition to the tags, CFML features scores of useful built-in functions that make it easy to handle data structures such as queries, arrays, strings, lists, dates, and variables.

In addition to its capability to interact with ODBC-compliant databases, ColdFusion extends its usefulness with the capability to interact with other services running on your server. These include

  Mail servers
  Lightweight Directory Access Protocol (LDAP) directory servers
  Verity search engine collections
  Java applets
  COM/DCOM objects

Thus, it becomes easy to perform basic tasks common to many Web-based applications. In an electronic commerce application, for example, you could gather a user’s purchases as he or she shops, storing them in a backend database table. At checkout time, you query the database for the user’s purchases and present them for confirmation. Then you collect the user’s credit card information, stashing that in your database as well, and email a receipt confirming the purchase. All these steps are simple to implement using ColdFusion.

This chapter introduces you to the ColdFusion application development environment. The major components of this environment include

  The ColdFusion Application Server, which can be installed on either a Windows NT/98 or Solaris platform
  The ColdFusion Administrator, a browser-based interface that enables you to configure the ColdFusion Application Server
  ColdFusion Studio, a useful tool for authoring ColdFusion templates

Over the course of the chapter, you’ll also learn about many of the useful CFML tags and functions that make Web-based application development with ColdFusion a straightforward and enjoyable task.


NOTE:  A single chapter cannot do justice to the power and utility of the ColdFusion development environment. For a fuller treatment, you should consult Ben Forta’s popular book, The ColdFusion Web Application Construction Kit, Second Edition, published by Que.


What Else Do I Need to Know to Develop ColdFusion Applications?

Understanding the ColdFusion development environment and mastering CFML are two important steps in becoming proficient in developing ColdFusion applications. However, to do serious application development, you should also be versed in the following skills:

  HTML—CFML instructions are embedded inside HTML code, so to excel at ColdFusion development, you need to truly understand HTML and be able to work with raw HTML code.
  Relational database design—You should have a command of data modeling theory and how to express your model in terms of fields and tables in a relational database.
  Structured Query Language (SQL)—SQL (pronounced “sequel”) is the language used to pose queries to, insert data into, update data in, or delete data from a backend database. You can find an excellent SQL tutorial on the Web at w3.one.net/~jhoffman/sqltut.htm.
  JavaScript—You can combine JavaScript and ColdFusion to produce applications more powerful and flexible than those you could create with ColdFusion alone.

You will most definitely need to have a basic understanding of HTML, SQL, and relational database design to become a competent ColdFusion developer. After you feel well grounded in these basics, you can then move on to building JavaScript-enabled ColdFusion applications. But knowing JavaScript is not an absolute prerequisite for being able to develop with ColdFusion.

Installing the ColdFusion Application Server

As noted earlier in the chapter, the Cold Fusion Application Server can run on both Windows NT/98 and Solaris platforms. On a Windows server, ColdFusion is compatible with the following kinds of HTTP servers:

  Netscape servers, such as FastTrack or Enterprise
  Microsoft servers, such as Internet Information Server (IIS) or Peer Web Services (PWS)
  O’Reilly WebSite Pro
  Apache for NT

If you’re installing ColdFusion on a Solaris machine, it will need to be running with one of the following Web servers:

  Apache
  Netscape Enterprise or FastTrack servers


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.