Programming ColdFusion MX, 2nd Edition

Book description

ColdFusion has enjoyed widespread use among developers as a powerful, easy-to-learn platform for creating and deploying dynamic web applications. ColdFusion's simple, tag-based language makes it easy to handle basic tasks, like processing form data and querying databases, but the language is also powerful enough to deliver highly scalable, robust applications. And now that Macromedia has integrated ColdFusion into its MX family of technologies, ColdFusion is capable of interacting with Flash MX applications, which opens up even more possibilities.The first edition of this book has been praised as "the best reference book available on the subject." This new edition, Programming ColdFusion MX, 2nd Edition, goes even further, documenting new techniques for using ColdFusion MX 6.1 to develop and serve dynamic web page content. This exhaustive guide covers everything from the basics to advanced topics, with numerous examples that you can use for your own applications. Contents include:

  • Sharing application data using the web application framework and shared scope variables
  • Accessing databases, maintaining database records, and advanced database techniques such as drill-down queries, query caching, and query of queries
  • Integrating applications with ColdFusion MX's new security framework
  • Interacting with other data sources, including LDAP directories, email servers, and other web servers
  • Extending ColdFusion with user-defined functions (UDFs), custom tags, and ColdFusion Components (CFCs)
  • Advanced topics such as working with XML, consuming and producing web services, and integrating ColdFusion with Flash via Flash Remoting
  • Reference material for all the tags and functions that comprise CFML, the ColdFusion Markup Language
Programming ColdFusion MX, 2nd Edition, covers ColdFusion MX 6.1, the latest release of ColdFusion, and is packed with advanced strategies, insider hints, tips, and tricks for creating effective web applications. If you are a ColdFusion developer, you need this book to help you make the most out of ColdFusion MX.

Publisher resources

View/Submit Errata

Table of contents

  1. Programming ColdFusion MX, 2nd Edition
  2. A Note Regarding Supplemental Files
  3. Preface
    1. What’s New in ColdFusion MX
    2. Readers of the First Edition
    3. Audience
    4. Organization
    5. Conventions Used in This Book
    6. Comments and Questions
    7. Acknowledgments
  4. 1. Introducing ColdFusion
    1. 1.1. What Is ColdFusion?
    2. 1.2. ColdFusion Architecture
    3. 1.3. Getting Started with ColdFusion
  5. 2. ColdFusion Basics
    1. 2.1. Getting Started
      1. 2.1.1. Saving CFML Templates
      2. 2.1.2. Tag Syntax
      3. 2.1.3. Comments
    2. 2.2. Datatypes
    3. 2.3. Variables
      1. 2.3.1. Variable Names
      2. 2.3.2. Assigning Values to Variables
      3. 2.3.3. Variable Scope
      4. 2.3.4. Specifying Default Values Using cfparam
    4. 2.4. Expressions
      1. 2.4.1. Operators
      2. 2.4.2. Functions
    5. 2.5. Writing Output
      1. 2.5.1. Using Pound Signs Within Expressions
        1. 2.5.1.1. Including an expression within a string
        2. 2.5.1.2. Including expressions within tag attributes
      2. 2.5.2. Nested Pound Signs
      3. 2.5.3. Escaping Pound Signs
    6. 2.6. Conditional Processing
      1. 2.6.1. cfif, cfelseif, and cfelse
      2. 2.6.2. cfswitch, cfcase, and cfdefaultcase
      3. 2.6.3. IIF
    7. 2.7. Looping
      1. 2.7.1. Index Loops
      2. 2.7.2. Conditional Loops
    8. 2.8. Including Other Templates
  6. 3. Passing Data Between Templates
    1. 3.1. Passing Parameters Via URL
      1. 3.1.1. Dealing with Special Characters
      2. 3.1.2. Obtaining a List of All Available URL Parameters
    2. 3.2. Passing Data Using Forms
      1. 3.2.1. Handling Specific Types of Form Fields
        1. 3.2.1.1. Multiple selection lists
        2. 3.2.1.2. Checkboxes and radio buttons
      2. 3.2.2. Using Hidden Form Fields
      3. 3.2.3. Automatically Validating Form-Field Data
      4. 3.2.4. Manually Validating Form-Field Data
      5. 3.2.5. Obtaining a List of All Available Form Variables
    3. 3.3. Dealing with Nonexistent Parameters
  7. 4. Database Basics
    1. 4.1. Configuring Data Sources
      1. 4.1.1. Configuring a Data Source in the ColdFusion Administrator
      2. 4.1.2. Additional Resources
    2. 4.2. Introducing cfquery
    3. 4.3. A Quick SQL Primer
    4. 4.4. Retrieving and Displaying Data
      1. 4.4.1. Creating the Example Database
      2. 4.4.2. Retrieving Data from a Data Source
      3. 4.4.3. Outputting Query Results
      4. 4.4.4. Obtaining Additional Query Information
    5. 4.5. Sorting Query Results
    6. 4.6. Grouping Output
    7. 4.7. Looping Over a Query Result Set
    8. 4.8. Formatting Techniques
      1. 4.8.1. Formatting Plain-Text Strings
        1. 4.8.1.1. Using ParagraphFormat
        2. 4.8.1.2. Wrapping text
        3. 4.8.1.3. Changing case
        4. 4.8.1.4. Making strings JavaScript-safe
        5. 4.8.1.5. Making strings safe for XML
      2. 4.8.2. Formatting HTML
        1. 4.8.2.1. HTMLCodeFormat
        2. 4.8.2.2. HTMLEditFormat
      3. 4.8.3. Formatting Numbers
        1. 4.8.3.1. Formatting decimal numbers
        2. 4.8.3.2. General number formatting
        3. 4.8.3.3. Locale-specific number formatting
      4. 4.8.4. Formatting Currency Values
        1. 4.8.4.1. Formatting dollars
        2. 4.8.4.2. Locale-specific currency formatting
        3. 4.8.4.3. Locale-specific currency formatting with the euro
      5. 4.8.5. Formatting Boolean Values
      6. 4.8.6. Formatting Dates and Times
        1. 4.8.6.1. General date formatting
        2. 4.8.6.2. Locale-specific date formatting
        3. 4.8.6.3. General time formatting
        4. 4.8.6.4. Locale-specific time formatting
  8. 5. Maintaining Database Records
    1. 5.1. Inserting Records
      1. 5.1.1. Inputting Data Via Forms
      2. 5.1.2. Inserting Form-Field Data
        1. 5.1.2.1. Inserting a record using cfquery
        2. 5.1.2.2. Inserting a record using cfinsert
    2. 5.2. Updating Existing Records
      1. 5.2.1. Choosing a Record to Update
      2. 5.2.2. Dynamically Populating Update Forms
      3. 5.2.3. Performing the Database Update
        1. 5.2.3.1. Updating a record using cfquery
        2. 5.2.3.2. Updating a record using cfupdate
      4. 5.2.4. Dynamically Populating Additional Form-Field Types
        1. 5.2.4.1. Populating text areas
        2. 5.2.4.2. Populating select lists
        3. 5.2.4.3. Generating and selecting multiple checkboxes
        4. 5.2.4.4. Generating and selecting radio buttons
    3. 5.3. Deleting Records
      1. 5.3.1. Deleting a Single Record
      2. 5.3.2. Deleting Multiple Records
      3. 5.3.3. Asking for Confirmation Before Deleting
      4. 5.3.4. A Note About Referential Integrity and Cascading Deletes
  9. 6. Complex Datatypes
    1. 6.1. Lists
      1. 6.1.1. Looping over a List
      2. 6.1.2. Manipulating Lists
    2. 6.2. Arrays
      1. 6.2.1. Initializing an Array
      2. 6.2.2. Adding Data to an Array
      3. 6.2.3. Manipulating Array Elements
    3. 6.3. Structures
      1. 6.3.1. Creating a Structure
      2. 6.3.2. Populating a Structure with Data
      3. 6.3.3. Using a Collection Loop to Loop over the Contents of a Structure
      4. 6.3.4. Creating an Array of Structures
      5. 6.3.5. Manipulating Structures
    4. 6.4. Query Objects
      1. 6.4.1. Manipulating Query Objects
  10. 7. Maintaining State
    1. 7.1. Setting Up the Web Application Framework
      1. 7.1.1. The Application.cfm File
      2. 7.1.2. The OnRequestEnd.cfm File
    2. 7.2. Using Shared Scope Variables
      1. 7.2.1. Locking
        1. 7.2.1.1. Locking shared scope variables at the scope level
        2. 7.2.1.2. Locking shared scope variable access using named locks
        3. 7.2.1.3. Locking access to nonthread-safe objects and file operations
        4. 7.2.1.4. Additional locking considerations
      2. 7.2.2. Application Variables
      3. 7.2.3. Client Variables
        1. 7.2.3.1. Client-variable storage options
        2. 7.2.3.2. Creating an external data source for client variable storage
        3. 7.2.3.3. Using client variables without cookies
        4. 7.2.3.4. Storing complex datatypes in client variables
        5. 7.2.3.5. Client variables and clustering
        6. 7.2.3.6. Deleting client variables
      4. 7.2.4. Cookies
        1. 7.2.4.1. Setting cookies
        2. 7.2.4.2. Retrieving cookies
        3. 7.2.4.3. Deleting cookies
      5. 7.2.5. Session Variables
        1. 7.2.5.1. Using session variables without cookies
        2. 7.2.5.2. Deleting session variables
        3. 7.2.5.3. Session variables and clustering
      6. 7.2.6. Server Variables
    3. 7.3. Browser Redirection
    4. 7.4. Portal Example
      1. 7.4.1. Web Application Framework
      2. 7.4.2. Main Template
      3. 7.4.3. Customization
  11. 8. Security
    1. 8.1. Security Basics
    2. 8.2. Implementing Security from Scratch
      1. 8.2.1. Creating a Simple Security Table in the Database
      2. 8.2.2. Setting Up the Application.cfm Template
      3. 8.2.3. Creating Login and Registration Screens
      4. 8.2.4. Authenticating Users
      5. 8.2.5. Securing Non-CFML Files
      6. 8.2.6. Levels of Access
    3. 8.3. Taking Advantage of ColdFusion MX’s New Security Framework
      1. 8.3.1. Authenticating Users
        1. 8.3.1.1. Application-based authentication
        2. 8.3.1.2. HTTP authentication
      2. 8.3.2. Role-Based Permissions
  12. 9. Error and Exception Handling
    1. 9.1. Basic Exception Handling
    2. 9.2. Custom Exception Handling
    3. 9.3. Rethrowing Exceptions
    4. 9.4. Error Handling Within the Web-Application Framework
      1. 9.4.1. Form Validation Errors
      2. 9.4.2. Request Errors
      3. 9.4.3. Specific Exceptions
      4. 9.4.4. Monitors (ColdFusion 5 Only)
      5. 9.4.5. Exception Logging
    5. 9.5. Server-Wide Error Handling
      1. 9.5.1. Missing Template Handler
      2. 9.5.2. Site-wide Error Handler
  13. 10. Dynamic Form Controls
    1. 10.1. Combining HTML and CFML Form Controls
    2. 10.2. Basic Input Controls
      1. 10.2.1. Data Validation
      2. 10.2.2. Data Validation with JavaScript Regular Expressions
    3. 10.3. Textual Input
    4. 10.4. A Selection Control
    5. 10.5. Sliders
    6. 10.6. Grids
      1. 10.6.1. Customizing Column Data
      2. 10.6.2. Specifying Row Data
      3. 10.6.3. Creating Updateable Grids
        1. 10.6.3.1. Updating a grid using cfgridupdate
        2. 10.6.3.2. Updating a grid using cfquery
        3. 10.6.3.3. Advanced editable grid controls
    7. 10.7. Trees
      1. 10.7.1. Populating a Tree Control
        1. 10.7.1.1. Creating a static tree
        2. 10.7.1.2. Dynamically populating a tree control with query data
      2. 10.7.2. Submitting a Tree Selection
      3. 10.7.3. Creating a Tree Via Recursion
    8. 10.8. Preserving Input
    9. 10.9. Custom Controls
  14. 11. Advanced Database Techniques
    1. 11.1. Display Techniques
      1. 11.1.1. Flushing Page Output
      2. 11.1.2. Displaying Limited Record Sets
      3. 11.1.3. Alternating Row Color in HTML Tables
      4. 11.1.4. Multicolumn Output
        1. 11.1.4.1. Sorting multicolumn output from left to right
        2. 11.1.4.2. Sorting multicolumn output from top to bottom
      5. 11.1.5. Next/Previous Record Browsing
      6. 11.1.6. Controlling Whitespace
        1. 11.1.6.1. Optimizing output
        2. 11.1.6.2. Suppressing output
        3. 11.1.6.3. Suppressing whitespace
    2. 11.2. Drilldown Queries
    3. 11.3. Query Caching
    4. 11.4. Advanced SQL
      1. 11.4.1. Dynamic SQL
      2. 11.4.2. Creating and Modifying Tables
        1. 11.4.2.1. Creating new tables
        2. 11.4.2.2. Populating new tables with existing data
        3. 11.4.2.3. Altering table design
        4. 11.4.2.4. Deleting tables
      3. 11.4.3. Retrieving Unique Values
      4. 11.4.4. Using Column Aliases
      5. 11.4.5. Scalar Functions
      6. 11.4.6. Aggregate Functions
      7. 11.4.7. Subqueries
      8. 11.4.8. Unions
      9. 11.4.9. Joins
        1. 11.4.9.1. Inner joins
        2. 11.4.9.2. Outer joins
      10. 11.4.10. Data Binding and Preventing Malicious Query Code
    5. 11.5. Query of Queries
    6. 11.6. Calling Stored Procedures
      1. 11.6.1. Using cfstoredproc
        1. 11.6.1.1. Passing parameters using cfprocparam
        2. 11.6.1.2. Specifying result sets using cfprocresult
      2. 11.6.2. Using cfquery
    7. 11.7. Transaction Processing
  15. 12. Manipulating Files and Directories
    1. 12.1. Working with Directories
      1. 12.1.1. Listing Directory Contents
      2. 12.1.2. Creating a Directory
      3. 12.1.3. Renaming a Directory
      4. 12.1.4. Deleting a Directory
    2. 12.2. Dealing with Files
      1. 12.2.1. Uploading Files
      2. 12.2.2. Renaming Files
      3. 12.2.3. Moving Files
      4. 12.2.4. Copying Files
      5. 12.2.5. Deleting Files
      6. 12.2.6. Reading Text Files
      7. 12.2.7. Reading Binary Files
      8. 12.2.8. Writing Text Files
      9. 12.2.9. Writing Binary Files
      10. 12.2.10. Appending Text Files
    3. 12.3. Performing FTP Operations
      1. 12.3.1. Connecting to a Remote Server
      2. 12.3.2. Automatically Opening a Connection
      3. 12.3.3. Closing the Connection
      4. 12.3.4. Performing File and Directory Operations
        1. 12.3.4.1. Obtaining a directory listing
        2. 12.3.4.2. Uploading files
        3. 12.3.4.3. Downloading files
        4. 12.3.4.4. Deleting files
    4. 12.4. Executing Command-Line Programs
  16. 13. Working with Email
    1. 13.1. Sending Email
      1. 13.1.1. Sending HTML Mail
      2. 13.1.2. Sending Multi-Part Messages
      3. 13.1.3. Emailing Form Contents
      4. 13.1.4. Adding Query Results to Email
      5. 13.1.5. Including Grouped Query Results
      6. 13.1.6. Sending Customized Email to Multiple Recipients
      7. 13.1.7. Sending File Attachments
      8. 13.1.8. Specifying Additional Header Information
    2. 13.2. Dealing with Undeliverable Email
    3. 13.3. Retrieving Messages
      1. 13.3.1. Retrieving Message Headers
      2. 13.3.2. Retrieving Message Contents
      3. 13.3.3. Dealing with Attachments
      4. 13.3.4. Deleting Messages
    4. 13.4. Building a Web-Based Email Client
      1. 13.4.1. Moving Beyond a Basic Email Client
  17. 14. Interacting with Other Web Servers Using HTTP
    1. 14.1. Retrieving Information
      1. 14.1.1. Saving Information to a Variable
      2. 14.1.2. Saving Information to a File
      3. 14.1.3. Retrieving HTTP Header Information
      4. 14.1.4. Creating Query Objects from Text Files
      5. 14.1.5. Passing Parameters
    2. 14.2. Parsing Data
    3. 14.3. Generating Static HTML Pages
    4. 14.4. Posting Information
      1. 14.4.1. Sending Form-Field Data
      2. 14.4.2. Sending URL Variables
      3. 14.4.3. Sending CGI Variables
      4. 14.4.4. Sending Cookies
      5. 14.4.5. Sending Files
      6. 14.4.6. Sending XML
      7. 14.4.7. Sending Header and Body Content
    5. 14.5. cfhttp Considerations
      1. 14.5.1. JRE-Related Issues in ColdFusion MX
      2. 14.5.2. Authentication
  18. 15. Interfacing with LDAP-Enabled Directories
    1. 15.1. LDAP Basics
      1. 15.1.1. LDAP Attributes
      2. 15.1.2. Public LDAP Servers
    2. 15.2. Querying an LDAP Directory
      1. 15.2.1. Performing an LDAP Query
      2. 15.2.2. Obtaining the LDAP Server Schema
    3. 15.3. Modifying LDAP Entries
      1. 15.3.1. Adding/Updating Entries
      2. 15.3.2. Deleting Entries
    4. 15.4. Modifying the Distinguished Name
  19. 16. Working with the Verity Search Interface
    1. 16.1. Creating Collections
      1. 16.1.1. Creating Collections with the ColdFusion Administrator
      2. 16.1.2. Creating Collections with the cfcollection Tag
    2. 16.2. Populating Collections
      1. 16.2.1. Indexing Files
        1. 16.2.1.1. Indexing files with the ColdFusion Administrator
        2. 16.2.1.2. Indexing files programmatically with cfindex
      2. 16.2.2. Indexing Query Results
        1. 16.2.2.1. Indexing database query results
        2. 16.2.2.2. Indexing cfldap query results
        3. 16.2.2.3. Indexing cfpop query results
    3. 16.3. Searching Collections
      1. 16.3.1. Building a Search Interface
        1. 16.3.1.1. Searching file collections
        2. 16.3.1.2. Searching database collections
    4. 16.4. The Verity Search Language
      1. 16.4.1. Simple Versus Explicit Searches
        1. 16.4.1.1. Operators
          1. 16.4.1.1.1. Order of evaluation
          2. 16.4.1.1.2. Prefix and infix notation
          3. 16.4.1.1.3. Quotation marks
          4. 16.4.1.1.4. Special characters
          5. 16.4.1.1.5. Concept operators
          6. 16.4.1.1.6. Evidence operators
          7. 16.4.1.1.7. Proximity operators
          8. 16.4.1.1.8. Relational operators
          9. 16.4.1.1.9. Score operators
          10. 16.4.1.1.10. Modifiers
      2. 16.4.2. Building an Advanced Search Interface
    5. 16.5. Updating Collections
      1. 16.5.1. Adding New Records to a Collection
      2. 16.5.2. Deleting Records from a Collection
    6. 16.6. Maintaining Collections
      1. 16.6.1. Optimizing Collections
      2. 16.6.2. Repairing Collections
      3. 16.6.3. Purging Collections
      4. 16.6.4. Deleting Collections
    7. 16.7. Advanced Techniques
      1. 16.7.1. Creating a Top-Ten List
      2. 16.7.2. Custom Attributes
        1. 16.7.2.1. Populating the custom attributes
        2. 16.7.2.2. Searching the custom attributes
        3. 16.7.2.3. Extending the usefulness of custom attributes
      3. 16.7.3. Modifying the Verity Summary Attribute
      4. 16.7.4. Tweaking Verity’s XML Filter
      5. 16.7.5. Searching Database and Document Collections Simultaneously
  20. 17. Graphing and Charting
    1. 17.1. Creating a Simple Graph
    2. 17.2. Working with Dates
    3. 17.3. Charting Dynamic Data
    4. 17.4. Charting Multiple Data Series
      1. 17.4.1. Multiple Data Point Colors in a Single Series
    5. 17.5. Drilling Down on Graph Data
      1. 17.5.1. Passing Chart Parameters to JavaScript
    6. 17.6. Saving Charts to a Variable
    7. 17.7. Working with the Chart Cache
  21. 18. Regular Expressions in ColdFusion
    1. 18.1. Regular-Expression Syntax
      1. 18.1.1. Commenting Regular Expressions
      2. 18.1.2. Operators
      3. 18.1.3. POSIX Classes
      4. 18.1.4. Character Classes
      5. 18.1.5. Unsupported Perl Regular-Expression Conventions
    2. 18.2. Finding Strings
      1. 18.2.1. Maximal Versus Minimal Matching
    3. 18.3. Replacing Strings
    4. 18.4. Backreferences
      1. 18.4.1. Replacement String Case Conversion
      2. 18.4.2. Excluding Subexpressions from Backreferences
    5. 18.5. Useful Regular Expressions
    6. 18.6. Regular Expression Tester
  22. 19. Scripting
    1. 19.1. Scripting Syntax
      1. 19.1.1. Working with Variables
      2. 19.1.2. Commenting Your Code
    2. 19.2. Writing Output
    3. 19.3. Flow Control and Looping
      1. 19.3.1. if/else
      2. 19.3.2. switch/case
      3. 19.3.3. for Loops
      4. 19.3.4. for/in Loops
      5. 19.3.5. while Loops
      6. 19.3.6. do/while Loops
      7. 19.3.7. Using break Within a Loop
      8. 19.3.8. Using continue
    4. 19.4. Error and Exception Handling
  23. 20. User-Defined Functions
    1. 20.1. UDF Basics
      1. 20.1.1. Function Arguments in Tag-Based UDFs
      2. 20.1.2. Local Function Variables (The Function Scope)
      3. 20.1.3. Returning Data from a Function
    2. 20.2. Calling User-Defined Functions
      1. 20.2.1. A Note About Datatypes
    3. 20.3. Advanced Topics
      1. 20.3.1. Recursion
      2. 20.3.2. Error and Exception Handling
      3. 20.3.3. Assigning UDFs to Other Variable Scopes
      4. 20.3.4. UDFs and Custom Tags
    4. 20.4. Function Libraries
    5. 20.5. Script-Based UDFs
  24. 21. Creating Custom Tags
    1. 21.1. Getting Started
      1. 21.1.1. Why Custom Tags?
      2. 21.1.2. Custom Tags Versus Other Options
    2. 21.2. Calling Custom Tags
    3. 21.3. Passing Data
    4. 21.4. Returning Data
      1. 21.4.1. Returning Multiple Values from a Custom Tag
    5. 21.5. Attribute Validation and Error Handling
      1. 21.5.1. Handling Required Attributes
      2. 21.5.2. Handling Optional Attributes
      3. 21.5.3. Validating Datatypes
      4. 21.5.4. Error and Exception Handling
    6. 21.6. Advanced Techniques
      1. 21.6.1. Calling Custom Tags Via cfmodule
      2. 21.6.2. Importing Custom Tags as a Tag Library
        1. 21.6.2.1. A noteworthy cfimport bug
      3. 21.6.3. Adaptive Tags
      4. 21.6.4. Passing Attributes via Structures
      5. 21.6.5. Creating Tag Pairs
      6. 21.6.6. Nesting Custom Tags
        1. 21.6.6.1. Extending cf_sitewrapper with child tags
      7. 21.6.7. Aborting Tag Processing
    7. 21.7. Protecting Your Tags
    8. 21.8. CFX Tags
      1. 21.8.1. Registering CFX Tags
        1. 21.8.1.1. Registering C++ CFX tags
        2. 21.8.1.2. Registering Java CFX tags
      2. 21.8.2. Calling CFX Tags
      3. 21.8.3. Additional Resources
  25. 22. ColdFusion Components
    1. 22.1. Basic Concepts
    2. 22.2. Creating Components
      1. 22.2.1. Adding Metadata to Components
      2. 22.2.2. Component Methods
        1. 22.2.2.1. Method arguments
        2. 22.2.2.2. Returning data from methods
        3. 22.2.2.3. Method includes
      3. 22.2.3. Variable Scope in CFCs
      4. 22.2.4. Saving Components
    3. 22.3. Using Components
      1. 22.3.1. Using cfinvoke
      2. 22.3.2. Using cfobject and createObject( )
      3. 22.3.3. Calling a CFC Method Via URL
      4. 22.3.4. Calling a CFC Method Via Form Post
    4. 22.4. Advanced CFC Topics
      1. 22.4.1. Introspection
      2. 22.4.2. Inheritance
        1. 22.4.2.1. Global component inheritance with component.cfc
      3. 22.4.3. Component Security
        1. 22.4.3.1. Securing access using HTTP Basic Authentication
        2. 22.4.3.2. Securing access using ColdFusion’s built-in security framework
      4. 22.4.4. Assigning Component Instances to Shared Variable Scopes
  26. 23. XML and WDDX
    1. 23.1. Working with XML
      1. 23.1.1. A 30-Second XML Primer
      2. 23.1.2. XML Document Object
      3. 23.1.3. XML DOM Nodes
      4. 23.1.4. Generating Your Own XML
      5. 23.1.5. Matching XML Data with XPath
      6. 23.1.6. Transforming XML with XSLT
    2. 23.2. Using WDDX
      1. 23.2.1. What Can You Do with WDDX?
      2. 23.2.2. How Does It Work?
      3. 23.2.3. Show Me the WDDX!
      4. 23.2.4. Serializing and Deserializing Data
        1. 23.2.4.1. Serializing and deserializing simple values
        2. 23.2.4.2. Datatype conversion issues
        3. 23.2.4.3. Testing for well-formed WDDX
        4. 23.2.4.4. Serializing and deserializing complex datatypes
          1. 23.2.4.4.1. Record sets
          2. 23.2.4.4.2. Arrays
          3. 23.2.4.4.3. Structures
          4. 23.2.4.4.4. Binary data
      5. 23.2.5. Storing WDDX Packets
        1. 23.2.5.1. Storing packets in a text file
        2. 23.2.5.2. Storing packets in a database
      6. 23.2.6. Server-to-Browser WDDX Using JavaScript
        1. 23.2.6.1. Passing data to JavaScript on the browser
        2. 23.2.6.2. Simplifying the process
        3. 23.2.6.3. Passing data from JavaScript to ColdFusion
  27. 24. Web Services
    1. 24.1. Web Services Overview
    2. 24.2. Consuming Web Services
      1. 24.2.1. Registering Web Services in the ColdFusion Administrator
      2. 24.2.2. Consuming a ColdFusion MX Web Service
      3. 24.2.3. Dealing with Complex Datatypes
        1. 24.2.3.1. Complex types as return values
        2. 24.2.3.2. Complex types as input parameters
    3. 24.3. Producing Web Services
      1. 24.3.1. Handling Datatype Mapping in ColdFusion-Produced Web Services
      2. 24.3.2. Creating Custom Datatypes
    4. 24.4. Web Services Security
      1. 24.4.1. Securing Access Using HTTP Basic Authentication
      2. 24.4.2. Securing Access Using ColdFusion’s Built-in Security Framework
  28. 25. Working with the System Registry
    1. 25.1. Getting Registry Keys and Values
    2. 25.2. Setting Registry Keys and Values
    3. 25.3. Deleting Registry Keys and Values
  29. 26. Using the ColdFusion Scheduler
    1. 26.1. Scheduling Tasks with the ColdFusion Administrator
      1. 26.1.1. Logging Scheduled Tasks
      2. 26.1.2. Adding a Task
      3. 26.1.3. Manually Executing a Task
      4. 26.1.4. Updating and Deleting Tasks
        1. 26.1.4.1. Updating a task
        2. 26.1.4.2. Deleting a task
    2. 26.2. Scheduling Tasks with cfschedule
      1. 26.2.1. Adding Tasks
      2. 26.2.2. Updating Tasks
      3. 26.2.3. Deleting a Task
      4. 26.2.4. Running Tasks
    3. 26.3. Additional Considerations
  30. 27. Interacting with COM, CORBA, and Java
    1. 27.1. Working with COM
    2. 27.2. Calling CORBA Objects
    3. 27.3. Integrating ColdFusion and Java
      1. 27.3.1. Calling Java Objects
        1. 27.3.1.1. Overloading methods
        2. 27.3.1.2. Handling exceptions
        3. 27.3.1.3. The Java API
        4. 27.3.1.4. Taking advantage of the PageContext object
      2. 27.3.2. Communicating with Servlets and JSP Pages
        1. 27.3.2.1. Sharing data between ColdFusion and servlets/JSP pages
      3. 27.3.3. Using JSP Tags and Tag Libraries
  31. 28. Flash Remoting
    1. 28.1. Getting Started with Flash Remoting for ColdFusion MX
      1. 28.1.1. Setting Up Flash Remoting
      2. 28.1.2. Working with the Flash MX Editor
      3. 28.1.3. Writing ActionScript for Flash Remoting
    2. 28.2. Interacting with ColdFusion Pages
    3. 28.3. Interacting with ColdFusion Components
      1. 28.3.1. Introspecting CFCs in Flash MX
      2. 28.3.2. Securing Flash Remoting Applications
    4. 28.4. Interacting with Server-Side ActionScript
    5. 28.5. Flash Remoting with Java Objects Hosted on the ColdFusion MX Server
  32. A. Tag Reference
    1. A.1. Tags by Type
      1. A.1.1. Custom Tag Tags
      2. A.1.2. Database Tags
      3. A.1.3. Error, Exception-Handling, and Debugging Tags
      4. A.1.4. Extensibility Tags
      5. A.1.5. Filesystem Tags
      6. A.1.6. Flow Control Tags
      7. A.1.7. Form Tags
      8. A.1.8. Miscellaneous Tags
      9. A.1.9. Output Tags
      10. A.1.10. Protocol Tags
      11. A.1.11. Security Tags
      12. A.1.12. System Tags
      13. A.1.13. UDFs/CFCs/Web Services Tags
      14. A.1.14. Variable Manipulation Tags
      15. A.1.15. Verity Search Engine Tags
    2. A.2. Alphabetical List of Tags
      1. cfabort
      2. cfadminsecurity
      3. cfapplet
      4. cfapplication
      5. cfargument
      6. cfassociate
      7. cfauthenticate
      8. cfbreak
      9. cfcache
      10. cfcase
      11. cfcatch
      12. cfchart
      13. cfchartdata
      14. cfchartseries
      15. cfcol
      16. cfcollection
      17. cfcomponent
      18. cfcontent
      19. cfcookie
      20. cfdefaultcase
      21. cfdirectory
      22. cfdump
      23. cfelse
      24. cfelseif
      25. cferror
      26. cfexecute
      27. cfexit
      28. cffile
      29. cfflush
      30. cfform
      31. cfftp
      32. cffunction
      33. cfgraph
      34. cfgraphdata
      35. cfgrid
      36. cfgridcolumn
      37. cfgridrow
      38. cfgridupdate
      39. cfheader
      40. cfhtmlhead
      41. cfhttp
      42. cfhttpparam
      43. cfif
      44. cfimpersonate
      45. cfimport
      46. cfinclude
      47. cfindex
      48. cfinput
      49. cfinsert
      50. cfinternaldebug
      51. cfinvoke
      52. cfinvokeargument
      53. cfldap
      54. cflocation
      55. cflock
      56. cflog
      57. cflogin
      58. cfloginuser
      59. cflogout
      60. cfloop
      61. cfmail
      62. cfmailparam
      63. cfmailpart
      64. cfmodule
      65. cfnewinternaladminsecurity
      66. cfnewinternalregistry
      67. cfobject
      68. cfobjectcache
      69. cfoutput
      70. cfparam
      71. cfpop
      72. cfprocessingdirective
      73. cfprocparam
      74. cfprocresult
      75. cfproperty
      76. cfquery
      77. cfqueryparam
      78. cfregistry
      79. cfreport
      80. cfrethrow
      81. cfreturn
      82. cfsavecontent
      83. cfschedule
      84. cfscript
      85. cfsearch
      86. cfselect
      87. cfservlet
      88. cfservletparam
      89. cfset
      90. cfsetting
      91. cfsilent
      92. cfslider
      93. cfstoredproc
      94. cfswitch
      95. cftable
      96. cftextinput
      97. cfthrow
      98. cftrace
      99. cftransaction
      100. cftree
      101. cftreeitem
      102. cftry
      103. cfupdate
      104. cfwddx
      105. cfxml
  33. B. Function Reference
    1. B.1. Functions by Category
      1. B.1.1. Array Functions
      2. B.1.2. Date/Time Functions
      3. B.1.3. Decision/Evaluation Functions
      4. B.1.4. Encoding/Encryption Functions
      5. B.1.5. File/Directory Functions
      6. B.1.6. Formatting Functions
      7. B.1.7. Internationalization/Localization Functions
      8. B.1.8. List Functions
      9. B.1.9. Mathematical Functions
      10. B.1.10. Miscellaneous Functions
      11. B.1.11. Query Functions
      12. B.1.12. Security Functions
      13. B.1.13. String Functions
      14. B.1.14. Structure Functions
      15. B.1.15. Undocumented Functions
      16. B.1.16. Verity Functions
      17. B.1.17. XML Functions
    2. B.2. Alphabetical List of Functions
      1. Abs
      2. ACos
      3. ArrayAppend
      4. ArrayAvg
      5. ArrayClear
      6. ArrayDeleteAt
      7. ArrayInsertAt
      8. ArrayIsEmpty
      9. ArrayLen
      10. ArrayMax
      11. ArrayMin
      12. ArrayNew
      13. ArrayPrepend
      14. ArrayResize
      15. ArraySet
      16. ArraySort
      17. ArraySum
      18. ArraySwap
      19. ArrayToList
      20. Asc
      21. Asin
      22. Atn
      23. AuthenticatedContext
      24. AuthenticatedUser
      25. BitAnd
      26. BitMaskClear
      27. BitMaskRead
      28. BitMaskSet
      29. BitNot
      30. BitOr
      31. BitSHLN
      32. BitSHRN
      33. BitXor
      34. Ceiling
      35. CFusion_DBConnections_Flush
      36. CFusion_Decrypt
      37. CFusion_Disable_DBConnections
      38. CFusion_Encrypt
      39. CFusion_GetODBCDSN
      40. CFusion_GetODBCINI
      41. CFusion_SetODBCINI
      42. CFusion_Settings_Refresh
      43. CFusion_VerifyMail
      44. CF_GetDataSourceUserName
      45. CF_IsColdFusionDataSource
      46. CF_SetDataSourcePassword
      47. CF_SetDataSourceUserName
      48. Chr
      49. CJustify
      50. Compare
      51. CompareNoCase
      52. Cos
      53. CreateDate
      54. CreateDateTime
      55. CreateObject
      56. CreateODBCDate
      57. CreateODBCDateTime
      58. CreateODBCTime
      59. CreateTime
      60. CreateTimeSpan
      61. CreateUUID
      62. DateAdd
      63. DateCompare
      64. DateConvert
      65. DateDiff
      66. DateFormat
      67. DatePart
      68. Day
      69. DayOfWeek
      70. DayOfWeekAsString
      71. DayOfYear
      72. DaysInMonth
      73. DaysInYear
      74. DE
      75. DecimalFormat
      76. DecrementValue
      77. Decrypt
      78. DeleteClientVariable
      79. DirectoryExists
      80. DollarFormat
      81. Duplicate
      82. Encrypt
      83. Evaluate
      84. Exp
      85. ExpandPath
      86. FileExists
      87. Find
      88. FindNoCase
      89. FindOneOf
      90. FirstDayOfMonth
      91. Fix
      92. FormatBaseN
      93. GetAuthUser
      94. GetBaseTagData
      95. GetBaseTagList
      96. GetBaseTemplatePath
      97. GetClientVariablesList
      98. GetCurrentTemplatePath
      99. GetDirectoryFromPath
      100. GetException
      101. GetFileFromPath
      102. GetFunctionList
      103. GetHTTPRequestData
      104. GetHTTPTimeString
      105. GetK2ServerCollections
      106. GetK2ServerDocCount
      107. GetK2ServerDocCountLimit
      108. GetLocale
      109. GetMetaData
      110. GetMetricData
      111. GetNumericDate
      112. GetPageContext
      113. GetProfileSections
      114. GetProfileString
      115. GetTempDirectory
      116. GetTempFile
      117. GetTickCount
      118. GetTimeZoneInfo
      119. GetToken
      120. Hash
      121. Hour
      122. HTMLCodeFormat
      123. HTMLEditFormat
      124. IIf
      125. IncrementValue
      126. InputBaseN
      127. Insert
      128. Int
      129. IsArray
      130. IsAuthenticated
      131. IsAuthorized
      132. IsBinary
      133. IsBoolean
      134. IsCustomFunction
      135. IsDate
      136. IsDebugMode
      137. IsDefined
      138. IsK2ServerABroker
      139. IsK2ServerDocCountExceeded
      140. IsK2ServerOnline
      141. IsLeapYear
      142. IsNotMap
      143. IsNumeric
      144. IsNumericDate
      145. IsObject
      146. IsProtected
      147. IsQuery
      148. IsSimpleValue
      149. IsStruct
      150. IsUserInRole
      151. IsWDDX
      152. IsXmlDoc
      153. IsXmlElem
      154. IsXmlRoot
      155. JavaCast
      156. JSStringFormat
      157. Lcase
      158. Left
      159. Len
      160. ListAppend
      161. ListChangeDelims
      162. ListContains
      163. ListContainsNoCase
      164. ListDeleteAt
      165. ListFind
      166. ListFindNoCase
      167. ListFirst
      168. ListGetAt
      169. ListInsertAt
      170. ListLast
      171. ListLen
      172. ListPrepend
      173. ListQualify
      174. ListRest
      175. ListSetAt
      176. ListSort
      177. ListToArray
      178. ListValueCount
      179. ListValueCountNoCase
      180. LJustify
      181. Log
      182. Log10
      183. LSCurrencyFormat
      184. LSDateFormat
      185. LSEuroCurrencyFormat
      186. LSIsCurrency
      187. LSIsDate
      188. LSIsNumeric
      189. LSNumberFormat
      190. LSParseCurrency
      191. LSParseDateTime
      192. LSParseEuroCurrency
      193. LSParseNumber
      194. LSTimeFormat
      195. LTrim
      196. Max
      197. Mid
      198. Min
      199. Minute
      200. Month
      201. MonthAsString
      202. Now
      203. NumberFormat
      204. ParagraphFormat
      205. ParseDateTime
      206. Pi
      207. PreserveSingleQuotes
      208. Quarter
      209. QueryAddColumn
      210. QueryAddRow
      211. QueryNew
      212. QuerySetCell
      213. QuotedValueList
      214. Rand
      215. Randomize
      216. RandRange
      217. REFind
      218. REFindNoCase
      219. ReleaseCOMObject
      220. RemoveChars
      221. RepeatString
      222. Replace
      223. ReplaceList
      224. ReplaceNoCase
      225. REReplace
      226. REReplaceNoCase
      227. Reverse
      228. Right
      229. RJustify
      230. Round
      231. RTrim
      232. Second
      233. SetEncoding
      234. SetLocale
      235. SetProfileString
      236. SetVariable
      237. Sgn
      238. Sin
      239. SpanExcluding
      240. SpanIncluding
      241. Sqr
      242. StripCR
      243. StructAppend
      244. StructClear
      245. StructCopy
      246. StructCount
      247. StructDelete
      248. StructFind
      249. StructFindKey
      250. StructFindValue
      251. StructGet
      252. StructInsert
      253. StructIsEmpty
      254. StructKeyArray
      255. StructKeyExists
      256. StructKeyList
      257. StructNew
      258. StructSort
      259. StructUpdate
      260. Tan
      261. TimeFormat
      262. ToBase64
      263. ToBinary
      264. ToString
      265. Trim
      266. Ucase
      267. URLDecode
      268. URLEncodedFormat
      269. URLSessionFormat
      270. Val
      271. ValueList
      272. Week
      273. Wrap
      274. WriteOutput
      275. XmlChildPos
      276. XmlElemNew
      277. XmlFormat
      278. XmlNew
      279. XmlParse
      280. XmlSearch
      281. XmlTransform
      282. Year
      283. YesNoFormat
  34. C. Example Database Tables
  35. D. ColdFusion Resources
    1. D.1. Official Macromedia Resources
    2. D.2. Magazines
    3. D.3. Mailing Lists
    4. D.4. Blogs
    5. D.5. Community Resources
    6. D.6. User Groups
  36. Index
  37. About the Author
  38. Colophon
  39. Copyright

Product information

  • Title: Programming ColdFusion MX, 2nd Edition
  • Author(s): Rob Brooks-Bilson
  • Release date: August 2003
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781491909485