• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL



In this chapter

Who Should Use This Book

How to Use This Book

Who Should Use This Book

This book is written for anyone who wants to create cutting-edge Web-based applications.

If you are a Webmaster or Web page designer and want to create dynamic data-driven Web pages, this book is for you. If you are an experienced database administrator who wants to take advantage of the Web to publish or collect data, this book is for you, too. If you are starting out creating your Web presence, but want to serve more than just static information, this book will help get you there. Even if you are an experienced ColdFusion user, this book provides you with invaluable tips and tricks, and also serves as the definitive ColdFusion developer's reference.

This book teaches you how to create real-world Web-based applications that solve real-world problems. Along the way you acquire all the skills you need to design, implement, test, and roll out world-class applications.

How to Use This Book

This book is designed to serve two different, but complementary, purposes.

First, it is a complete tutorial of everything you need to know to harness ColdFusion's power. As such, the book is divided into four sections, and each section introduces new topics building on what has been discussed in prior sections. Ideally, you will work through these sections in order, starting with ColdFusion basics and then moving on to advanced topics.

Second, this book is an invaluable desktop reference tool. The appendixes and the accompanying CD-ROM contain reference chapters that will be of use to you while dew{loping ColdFusion applications. Those reference chapters are cross-referenced to the appropriate tutorial sections, so that step-by-step information is always readily available to you.


ColdFusion has grown into a massive application in a very short time, and a single volume could not do justice to all its features. As such, this book is being released in conjunction with a second book: Advanced ColdFusion 4 Application Development Kit (Que, ISBN 0-7897- 1810-3). Some of the advanced chapters that appear in prior editions of this book have been moved into that new book to facilitate better coverage of those topics.

Part I: Introduction

Part I of this book introduces ColdFusion and explains what exactly ColdFusion enables you to accomplish. Internet fundamentals are also introduced; a thorough understanding of these is a prerequisite to ColdFusion application development.

Chapter 1, "Why ColdFusion?," explains the concepts of data-driven World Wide Web sites and presents real-world examples of how this technology is being applied on some of the most popular sites on the Web. This chapter is not a technical overview of ColdFusion. Rather, it is a discussion of how ColdFusion can be used to enhance your Internet or intranet site.

In Chapter 2, "Introduction to ColdFusion," the core technologies that ColdFusion is built upon are introduced. The Internet and how it works are explained, as are DNS servers and URLs, Web servers and browsers, and Web server extensions such as CGI and server APIs. A good understanding of these technologies is a vital part of creating Web-based applications. This chapter also teaches you how ColdFusion works and explains the various components that comprise it.

Part II: Getting Up and Running

In Part II you learn how to install and configure ColdFusion, so that you can begin actual application development.

Chapter 3, "Installing ColdFusion and ColdFusion Studio," goes over ColdFusion's hardware and operating system prerequisites and walks you through the entire process of installing the ColdFusion Application Server and the ColdFusion Studio development environment.

Chapter 4, "Administering ColdFusion," introduces the ColdFusion Administrator. This Web-based program, written in ColdFusion itself, manages and maintains every aspect of your ColdFusion Application Server.

Part III: Getting Started with ColdFusion

Part III teaches the basics of Web-based application development, database design, and ColdFusion development. You learn how to create databases and tables, design relational databases, and create ODBC data sources that allow applications to interact with these tables. You also learn how to use ColdFusion Studio and begin creating live Web-based applications with ColdFusion.

Chapter 5, "Designing an Application," introduces fundamental concepts in application design and explains the process by which an application specification is created. Spending time up front on methodical application design pays great dividends later in the development process.

In Chapter 6, "Database Fundamentals," you are introduced to databases. Databases are mechanisms for storing and retrieving information, and almost every Web-based application you build will sit on top of a databases of some kind. Key database concepts such as tables, rows, columns, data types, keys, and indexes are taught, as are the basics of the relational database model. You also learn the differences between client-server– and shared-file–based databases, as well as the pros and cons of each.

Chapter 7, "Creating Databases and Tables," actually applies the lessons taught in Chapter 6. This chapter walks you through creating databases and tables for the sample application, with detailed step-by-step explanations of the entire process.

In Chapter 8, "Introduction to SQL," you learn the basics of the SQL language. SQL is a standard language for interacting with database applications, and all ColdFusion database manipulation is performed using SQL statements. The link between ColdFusion and your database itself is via ODBC, so this chapter introduces this technology and walks you through the process of creating ODBC data sources. Chapter 8 also teaches you how to use the SQL SELECT statement.

Chapter 9, "SQL Data Manipulation," introduces three other important SQL statements: INSERT, UPDATE, and DELETE.

Chapter 10, "Introduction to ColdFusion Studio," introduces ColdFusion's new development environment. ColdFusion Studio is a powerful HTML and CFML editor, and it is chock full of features designed to make Web page design and application development a whole lot easier. You learn how to use the editor, the tag chooser, and the expression builder, as well as how to configure the environment to work the way you do. You also learn how to use Studio for remote development.

Chapter 11, "ColdFusion Basics," is where you create your first ColdFusion application, albeit a very simple one. You also learn how to use <CFQUERY> to create queries that extract live data from your databases, and how to display query results using <CFOUTPUT>. Various formatting techniques, including using tables and lists, are taught as well. One method of displaying data on the Web is data drill down (which has become very popular), and this approach to data interaction is taught.

In Chapter 12, "ColdFusion Forms," you learn how to collect user-supplied data via HTML forms. This data may be used to build dynamic SQL statements that provide you with infinite flexibility in creating dynamic database queries. This chapter also teaches you how to create search screens that enable visitors to search on as many different fields as you allow.

Chapter 13, "Using Forms to Add or Change Data," teaches you how to use forms to add, update, and delete data in database tables. The ColdFusion tags <CFINSERT> and <CFUPDATE> are introduced, and you learn how <CFQUERY> can be used to insert, update, and delete data.

Chapter 14, "Using the SQL Query Builder," teaches you how to use the ColdFusion Studio SQL Query Builder to create complete SQL statements automatically. You learn how to create a JOIN, embed ColdFusion variables within your statements, how to test your statements within the environment, and about SQL statement reuse.

In Chapter 15, "Form Data Validation," you learn how to perform server-side and client-side validation. ColdFusion can generate JavaScript client-side validation code automatically, without you having to learn JavaScript. You learn how to use this feature, and how to provide your own validation rules.

Chapter 16, "The Report Writer," teaches the basics of using the Crystal Reports Professional report writer. The report writer allows you to create powerful data-driven reports that can be rendered into HTML on-the-fly using the ColdFusion <CFREPORT> tag.

Chapter 17, "Debugging and Troubleshooting," teaches you the kinds of things that can go wrong in ColdFusion application development and what you can do to rectify them. You learn how to use ColdFusion's debugging and logging features and the powerful integrated debugger; most importantly, you learn tips and techniques that can help you avoid problems in the first place.

Part IV: Advanced ColdFusion

Part IV teaches you advanced ColdFusion capabilities and techniques. The chapters in this section have been written with the assumption that you are familiar with basic SQL syntax and are comfortable creating ColdFusion templates.

Chapter 18, "Working with Projects," teaches you how to use the integrated ColdFusion Studio project tool. This time-saving feature allows you to work with entire applications at once, and one-step deployment simplifies the publishing process.

Chapter 19, "Advanced SQL," teaches you how to create powerful SQL statements using subqueries and joins and explains the advantages and disadvantages of each. You also learn how to calculate averages, totals, and counts, and how to use the EXISTS, NOT EXISTS, and DISTINCT keywords.

Chapter 20, "Working with Stored Procedures," takes advanced SQL one step further by teaching you how to create stored procedures and how to integrate them into your ColdFusion applications.

In Chapter 21, "Advanced ColdFusion Templates," you learn the tips and tricks needed to write powerful, scalable, and manageable applications. You learn how to comment your templates so that you, or other developers, will have an easier time maintaining the code in the future. You also see how ColdFusion facilitates code reuse with the <CFINCLUDE> tag and how to improve page processing time by using cached database queries. Finally, you learn how to create next N records-style interfaces—the same interface used by every major search engine and spider on the Internet!

Chapter 22, "Lists, Arrays, and Structures," teaches you how to use these advanced ColdFusion data types, enabling you to better manage and manipulate application data.

In Chapter 23, "Enhancing Forms with CFFORM," you learn how to take advantage of the ColdFusion-supplied Java form controls. These controls include a Windows Explorer–style tree control, an editable grid control, a slider control, and a highly configurable text input control. You also learn how to embed your own Java applets using the <CFAPPLET> tag.

Chapter 24, "Interacting with Email," introduces ColdFusion's email capabilities. ColdFusion allows you to create SMTP-based email messages using its <CFMAIL> tag. You learn how to send email messages containing user-submitted form fields, how to email the results of a database query, and how to do mass mailings to addresses derived from database tables. Additionally, you learn how to retrieve mail from POP mailboxes using the <CFPOP> tag.

Chapter 25, "Online Commerce," teaches you how to perform real-time electronic commerce, including credit card authorization via CyberCash. You build an entire working shopping cart application—one that you can use as a stepping stone when writing your own shopping applications.

In Chapter 26, "Web Application Framework," you learn how to take advantage of the ColdFusion Web Application Framework in order to add features to your Web application, including persistent client variables, sophisticated parameter and variable manipulation, and customized error message handling. You also learn how to use the application template to establish applicationwide settings and options.

Chapter 27, "Session Variables and Cookies," you learn how to use client, session, and application variables, as well as HTTP cookies. These special data types play an important part in creating a complete application that can track a client's state.

Chapter 28, "Working with Files and Directories," introduces the powerful and flexible ColdFusion <CFFILE> and <CFDIRECTORY> tags. You learn how to create, read, write, and append local files, manipulate directories, and even how to add file uploading features to your forms.

Chapter 29, "Full-Text Searching with Verity," introduces the Verity search engine. Verity provides a mechanism that does full-text searches against all sorts of data. The Verity engine is bundled with the ColdFusion Application Server, and the <CFINDEX> and <CFSEARCH> tags provide full access to Verity indexes from within your applications.

In Chapter 30, "Directory Services," you learn all about directory services and the LDAP protocol. You also learn how to use the powerful new <CFLDAP> tag that enables your applications to interact with directory services.

In Chapter 31, "Version Control," introduces version control and explains why it is such an important application development tool. You learn how to use ColdFusion's built-in version control system, as well as how to interface with existing version control systems of your own.

Chapter 32, "Event Scheduling," teaches you to create tasks that execute automatically and at timed intervals. You also learn how to dynamically generate static HTML pages using ColdFusion's scheduling technology.


Appendix A, "ColdFusion Tag Reference," is the definitive reference for every ColdFusion tag, with descriptive explanations, syntax tables, and examples for each. Topics are cross- referenced extensively to related topics and appropriate tutorial chapters in the book.

Appendix B, "ColdFusion Function Reference," is a complete reference of every ColdFusion function organized by category. Thorough descriptions and examples are given for every function, and extensive cross-references are provided.

Appendix C, "Verity Search Language Reference," is a complete guide to the Verity search language. Using the information provided here, you will be able to perform incredibly complex searches with minimal effort.


The accompanying CD-ROM contains everything you need to start writing ColdFusion applications, including:

  • Evaluation versions of ColdFusion 4 (for Windows, Windows NT, and Solaris)

  • Evaluation version of ColdFusion Studio 4

  • Source code and databases for all the examples in this book

  • Thirty add-on tags designed for use within your own applications

  • A demonstration version of Synergy, a complete information management system, written entirely in ColdFusion

  • Additional reference material and resources

Turn the page and start reading. In no time you'll be creating powerful Web-based applications using the ColdFusion Application Server.

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint