Home > Store

Essential ColdFusion 4.5 for Web Professionals

Register your product to gain access to bonus material or receive a coupon.

Essential ColdFusion 4.5 for Web Professionals

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2001
  • Dimensions: F
  • Pages: 240
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-040646-5
  • ISBN-13: 978-0-13-040646-0

With Allaire ColdFusion 4.5, you can build powerful, dynamic Web applications faster than you ever imagined! Learn ColdFusion 4.5 now, from professional Web developers, through real world projects with example code available from the companion Web site. Start with the basics, such as learning database fundamentals and setting up an Access database. Then master every element of a robust ColdFusion solution, from setting up your ColdFusion server through working with the most important ColdFusion tags and functions. Every project's code examples, database, and images are downloadable from the companion Web site. No other ColdFusion book gets you running this fast, or supports you this well!

You'll learn all this and much more-hands-on!

  • Database access and integration
  • Building online catalogs, step-by-step
  • Automating email and user interaction
  • Providing site search capabilities
  • Integrating ColdFusion with WAP and web-clipping technologies to build applications for WAP-enabled phones as well as wireless Palm devices

Look to Essential Books for ALL the Web Skills You Need!

All these books share the same great format and the same dynamic Web site ... so once you've used one, learning from the others is a piece of cake!

  • Essential Flash 5 for Web Professionals
  • Essential PHP for Web Professionals
  • Essential ASP for Web Professionals
  • Essential Design for Web Professionals
  • Essential CSS and DHTML for Web Professionals
  • Essential Perl 5 for Web Professionals
  • Essential JavaScript for Web Programmers
  • with more to come!

Downloads

Downloads

Download the source code related to this title.

Sample Content

Online Sample Chapter

Database Basics for ColdFusion Developers

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130406465.pdf

Table of Contents



1. Database Basics.

A Look at Relational Databases. Introduction to SQL. To Quote or Not to Quote? Project I: Creating an Access Database File. Setting Up an ODBC Connection1. Windows Control Panel. ColdFusion Administrator. Project II: Retrieving Data. SQL Builder. Recap.



2. ColdFusion Basics.

Commenting Your Code. Using Quotes. <CFPARAM>. Passing Variables. VARIABLES. URL. FORM. COOKIE. ATTRIBUTES. SESSION. CGI. APPLICATION. CLIENT. SERVER. Scope. Project I: Passing Variables Between Pages. <CFIF></CFIF>. <CFELSE>. <CFELSEIF>. Now Function. Date Functions. DateFormat. TimeFormat. Project II: Display Days Left Until a User-Defined Date. DateDiff. IsDefined. Replace. Project III: Using <CFLOOP>. Recap. Advanced Project.



3. Global Templates.

Defining the Application File (application.cfm). <CFAPPLICATION>. <CFERROR>. Project I: Setting Global Values for Your Site. Project II: Defining Header and Footer Files. <CFINCLUDE>. Recap. Advanced Project.



4. Building an Online Catalog.

Building an Administration Screen. Setting Up the Administration Screen. Project I: Viewing Items in Your Database. DollarFormat Function. CurrentRow. MOD. IIF. RecordCount. Project II: Uploading Files to Your Site. <CFFILE>. <CFDIRECTORY>. Project III: Adding Records to Your Database. Project IV: Editing an Existing Record in Your Database. Project V: Processing the Information. Adding a Record. <CFINSERT>. Updating a Record. <CFUPDATE>. Deleting a Record. Project VI: User Pages. Recap. Advanced Project.



5. Sending Email.

<CFMAIL>. <CFFORM>. <CFINPUT>. <CFSWITCH> <CFCASE> and <CFDEFAULTCASE> Tags. Project I: Sign Up! <CFPOP>. Project II: Retrieving Your Email from a POP Server. Recap. Advanced Project.



6. Searching the Site.

PreserveSingleQuotes. <CFTABLE> and <CFCOL>. <CFTABLE>. <CFCOL>. Project I: Search Engines 'R' Us. Using Verity with ColdFusion. <CFCOLLECTION>. <CFINDEX>. <CFSELECT>. Project II: Collection Management. Project III: Searching with Verity. <CFSEARCH>. Recap. Advanced Project.



7. Knowing Who's Who.

Security Basics. Project I: Protect Your Management Templates. Adding a Table to the shelleyCatalog Database. C Is for Cookie. Project II: Enhanced Functionality with <CFCOOKIE>. Recap. Advanced Project.



8. Using Custom Tags.

Introduction to Custom Tags. The Ins and Outs of Custom Tags. Where Can I Use Custom Tags? Project I: Counting Your Hits. SCRIPT_NAME Variable. Adding the Hits Table to the shelleyCatalog Database. Project II: Creating a Random Product Custom Tag. ListLen Function. ListAppend Function. ListGetAt Function. Other Functions Used in this Project. RandRange Function. Option 1-Code Every Page. Option 2-Make Use of the Developer's Friend, the Application.cfm File. Recap. Advanced Project.



9. ColdFusion and Wireless.

What Is WAP and How Is It Useful? Limitations. MIME Types. Internet Information Server 4 and 5. Personal Web Site (PWS). <CFCONTENT>. Project I: WAP-Enabled Product List. Wireless Palm(tm) Series of Handhelds. Limitations. Palm Query Application. Project II: Palm(tm)-Enabled Product List. META Tags. Building and Installing the Palm(tm) Query Application. Recap. Advanced Project.



Appendix A. An Introduction to Forms.

GET. POST. Buttons. Two Types of Buttons. Single-Line Text Box. Scrolling Text Box. Menus. Check Boxes. Radio Buttons. Putting It All Together.



Appendix B. ColdFusion Reference.


Index.

Preface

Introduction

In the beginning, creating websites using static pages was enough until people started to realize that updating content on their sites was a tedious chore. People also realized they had huge amounts of information they wanted to list on their constantly-changing websites, as well as in their databases.

Also needed was the ability to add logic to the websites, allowing the users to search through their products, buy their products online, or perform a number of other functions, turning it into one giant web application or a series of small ones. If a user comes to the website and performs a search, or navigates a certain way through the site, it would be nice to have pages dynamically built for them to accommodate where they are in the site. Suddenly several languages popped up that allowed the web developer to do all of these things and more. Each language had strengths and weaknesses such as learning curves and cost, but for the most part, many of these languages allowed you to create the same types of applications.

Languages Used for Web Application Development

There are several types of languages used for web development with new ones popping up all the time. Here are a few examples of some of the better-known ones being used today:

ColdFusion ASP—Active Server Pages
PHP C++
Drumbeat Lasso
JSP-Java Server Pages (Servlets) Perl
PHP Tango
Tcl

How Does ColdFusion Work?

ColdFusion doesn't require a high level of knowledge in programming or server-side scripting to get started in developing some pretty powerful applications. Written in a way that resembles HTML syntax, ColdFusion Markup Language (CFML) consists of tags and attributes that transform a static web page into a truly dynamic and customizable experience for each and every user. CFML consists of a series of tags and formatting options that perform different functions:

Syntax:

<CFOUTPUT>Today's date is: #DateFormat(Now(), "DDDD, MMMM DD, YYYY")#</CFOUTPUT>

Output:

Today's date is: Saturday, November 25, 2000

The ColdFusion application server runs behind your existing web server and parses the .cfm file (.cfm is the extension all ColdFusion pages are saved with) that was passed and converts it into plain HTML, which is then presented to the viewer. The user never sees the actual CFML coding which took place.

About ColdFusion

ColdFusion Application Server

Requirements

With the introduction of ColdFusion 4.5, ColdFusion Application Server now runs on several operating systems including Windows 95/98/2000/NT, Solaris, and Linux. The recommended minimum requirements are:

Enterprise Server

ColdFusion 4.5 for Windows

  • Windows NT, with service pack 4 or above
  • 150-MB hard drive
  • 128 MB of RAM

ColdFusion 4.5 for Linux

  • Red Hat Linux 6.0 or above
  • 150-MB hard drive
  • 128 MB of RAM

ColdFusion 4.5 for Solaris

  • SPARC Solaris 2.5, 2.6, or 7 with patch 103582-1B or above
  • 200-MB hard drive
  • 128 MB of RAM
Professional Server

ColdFusion 4.5 for Windows

  • Windows 95, 98, NT, or 2000
  • 50-MB hard drive
  • 32 MB of RAM

(Windows 2000 systems should have a minimum 96 MB of RAM)

ColdFusion 4.5 for Linux

  • Red Hat Linux 6.0 or above
  • 100-MB hard drive
  • 64 MB of RAM

NOTE

There have been some problems using the tag <CFCONTENT> (introduced in chapter 9) with service pack 6 for NT 4.0. If you are currently using this you should upgrade to service pack 6a to fix this problem.

Download ColdFusion 4.5

You can download a full-featured 30-day trial version of ColdFusion from Allaire's website (http://www.allaire.com) to install on your machine. You can also grab a copy of another version of ColdFusion called ColdFusion Express, that you can run as long as you would like absolutely free. The catch, you ask? It doesn't have all the functionality, nor can it handle all the tags the full version offers.

What's the Difference?

As mentioned before, ColdFusion comes in three versions. Express is considered the development platform for many newcomers to ColdFusion.

This leaves Professional and Enterprise editions to tangle with. For all intents and purposes these versions are identical. They will process your ColdFusion code exactly the same. The benefit to having ColdFusion Enterprise is its ability to use and administer a clustered ColdFusion server environment to deal with failover (one system receiving too many requests and a second system (or more) assisting in handling the traffic). It also has native support for more database solutions such as Oracle and Sybase.

Differences Between Express and the Full Version

Yep, the other shoe has dropped. Express is a great product to get your feet wet with ColdFusion. Since its creation its intent was to feed you and allow you to learn ColdFusion for free and fall in love. Then once you're hooked, you'll have to pony up for the Enterprise or Professional versions of the product.

Rather than telling you what won't work, we'll list the tags that will work in ColdFusion Express. Most of these tags will be covered in this book along with some of the other full-version tags.


Tags in this book that are supported by ColdFusion Express
<CFABORT>
<CFAPPLICATION>
<CFBREAK>
<CFCOOKIE>
<CFIF> <CFELSEIF> <CFELSE>
<CFINCLUDE>
<CFINSERT>
<CFLOCATION>
<CFLOOP>
<CFOUTPUT>
<CFPARAM>
<CFQUERY>
<CFSET>
<CFSETTING>
<CFSWITCH> <CFCASE> <CFDEFAULTCASE>
<CFUPDATE>

Now if these aren't enough tags to work with, you have another option! Allaire provides free 30-day evaluations of most of their products, including ColdFusion. I would get very comfortable with the tags above while using Express and then give the evaluation full version a shot to do some test development. But make sure to do it quickly; 30 days really flies when you're having fun!

ColdFusion Studio

Although ColdFusion Studio is not required to create ColdFusion pages, it will make your life a little easier with all the wizards and built-in tools it has to offer, which will aid you in creating your pages quicker than if you were to do this in a regular text editor.

Cold Fusion Studio 4.5 has the following minimum requirements:

  • Windows 95, 98, 2000, or NT
  • 35 MB of disk space
  • 32 MB of RAM

(Windows 2000 systems should have a minimum of 96 MB of RAM)

Who This Book Is Written for and What Is Assumed

This book is written for anyone wanting to learn how to build dynamically driven database sites. You should already know how to use HTML and have an understanding of HTML forms. If you are unfamiliar with HTML forms or need a quick tutorial, check out Appendix A.

You should also have an understanding of Microsoft Access and the Structured Query Language (SQL). All of the Access databases we use in this book as well as the code and images will be on the companion website (www.phptr.com/essential/coldfusion/). In chapter 1 we will also go over creating the shelleyCatalog Access database, which you will use in a few of these chapters.

Find Online Support and Documentation

There are several sites on the web that have communities of ColdFusion programmers who openly share their knowledge and expertise. One of the best places is the Allaire website itself where there is support for all of Allaire's products:

http://www.allaire.com/developer

You will also want to check out the Allaire Knowledge Base from time to time to find answers to frequently asked questions:

http://www.allaire.com/Support/KnowledgeBase/SearchForm.cfm

ColdFusion 4.5 server also comes with online documentation that was installed on your hard drive during the installation process. This can be found at:

http://127.0.0.1/CFDOCS/dochome.htm

NOTE

127.0.0.1 is used throughout this book to refer to your local machine. This is the loopback IP address used for your local machine. The name localhost will work as well, or if your machine has been assigned its own IP address you can use it.

During installation you can choose to install the example applications that come with ColdFusion server. This is good for poking around and learning some already functional applications. Additional references are listed in Appendix B.

Sites Using ColdFusion


Here are a few sites now using ColdFusion:
Ablecommerce http://www.ablecommerce.com
Autobytel http://www.autobytel.com
PolarisMan.com http://www.polarisman.com
OnVia http://www.onvia.com
E-ThePeople http://www.e-thepeople.com
Computer Acquisition Guide http://computer.pwgsc.gc.ca
Wireless Advisor http://www.wirelessadvisor.com

How This Book Is Laid Out

In order to demonstrate a wide range of functionality and practicality, a fictitious company "Shelley Biotechnologies" will be used to showcase its product line.

As we build this site we will teach you the components that go into creating different types of applications with ColdFusion.

The projects in each chapter are designed to build on the new functionality you are learning and apply it toward an application you would use in a real-life situation. At the end of each chapter you will be asked to complete a more advanced project based on what you have just done. The answer or possible solution is on the companion website.

While we teach you how to use ColdFusion using some of the most widely used tags and functions in the language, there are still plenty of other tags and functions that this book does not cover. These can be found in the documentation that comes with ColdFusion.

Updates

Errata

Chapter 4, Page 87

Project 4

The 'editItem' query in the itemManager.cfm page needs to be updated to:


SELECT *
FROM products, Category
WHERE (Category.categoryID = Products.category) AND (Products.sku =
#URL.sku#)

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020