PRODUCT SUPPORT ANNOUNCEMENT
Some videos and Web Editions may be returning errors on launch. Learn more.
ColdFusion is a rapid application development tool used to create Web sites throughout the Internet. The product's ease of use and capabilities allow even inexperienced developers to rapidly produce basic Web sites.
The ColdFusion MX Developer's Cookbook focuses upon teaching the use of ColdFusion's advanced features in the development of more complex Web sites -- Web sites that interact with other sites on the Internet, that are data-driven rather than static, and that are not necessarily confined to one server.
Though the basics of ColdFusion are easily picked up by even novice programmers, many encounter difficulties when they attempt to master more advanced features because they lack formal training. The ColdFusion MX Developer's Cookbook provides recipes and insights into ColdFusion, and along the way teaches some of the fundamentals of the development process.
The recipes serve as templates for database access, custom tags, scripting, generating charts and graphs, and linking into other resources on the Web using SOAP and .NET.
I. DATATYPES AND CONTAINERS.1. String Manipulation.
Introduction. Concatenating Strings. Delimiting Strings. Using ASCII Character Codes. Forming Substring. Encrypting Strings. Hashing Strings. Iterating Through a String. Reading a File Line by Line. Searching a String. Replacing Substrings within a String. Using REFind() to Perform a Literal String Search. Using Qualifiers to Indicate Multiplicity. Using Wildcards. Using Brackets. Performing OR Operations. Escaping Special Characters. Using Character Classes.2. Working with Lists.
Introduction. Creating Lists. Changing Delimiters. Extracting Elements. Handling Empty Values. Changing Values in a List. Searching a List. Sorting a List. Adding Qualifiers to a List. Looping Through a List. Looping Over a Structures Key List. Looping Until a List Is Empty. Parsing Input Forms.3. Arrays.
Introduction. Creating an Array. Adding an Element to an Array. Displaying a Value in an Array. Looping over an Array. Manipulating Array Values. Sorting an Array. Multidimensional Arrays. Creating Arrays with More Than Three Dimensions. Array Aggregate Functions. Array Utility Functions. Array Information Functions.4. Structures.
Introduction. Creating a Structure. Using Structure Information Functions. Using Structure Management Functions. Inserting Values into a Structure. Updating Values in a Structure. Displaying the Value of an Element in a Structure Using the Key Name. Using Dot Notation. Looping Over a Structure. Using Structure Utility Functions. Copying Structures. Sorting Structures.5. Queries.
Introduction. Querying a Database. Programmatically Creating Queries. Displaying Query Results. Using Query Variables. Creating Queries of Queries. Converting a Query Column to a List. Caching a Query.6. Dates and Times.
Introduction. Creating a Date, Time, or DateTime Object. Formatting Dates. Comparing Dates. Determining Date Differences. Formatting Times. Defining Time Spans. Using Date Information Functions. Managing Dates and Times in Different Locales.
II. CONTROLLING APPLICATION FLOW.7. Application Flow.
Introduction. Creating a ColdFusion Application. Using the Application Variable Scope. Implementing Session Management. Implementing Client Management. Storing Client State Using the Registry. Storing Client State Using Cookies. Storing Client State Using a Database.8. Exception Handling.
Introduction. Catching Exceptions. Catching Multiple Exceptions. Examining an Exception. Throwing Exceptions. Re-Throwing Exceptions.
III. USING UTILITY TAGS.9. Charting Data.
Introduction. Creating a Simple Chart. Managing the Chart Container. Managing Chart Series. Populating a Chart Series with Explicit. Populating Charts with Query Values. Implementing Click-Through Behaviors in Charts. Administering Charts Through the ColdFusion Administrator.10. Files and Directories.
Introduction. Reading Files. Writing Files. Appending to Files. Uploading Files. Manipulating Files. Listing Directories. Manipulating Directories.11. Using Internet Protocols.
Introduction. HTTP Requests. Sending Email. Receiving Email. Querying an LDAP Directory. Adding an LDAP Entry. Updating an LDAP Entry. Adding and Deleting an LDAP Attributes. Renaming an Entry. Deleting an LDAP Entry. Sending a File via FTP. Getting a File via FTP.12. Using Verity.
Introduction. Creating a Collection. Adding Information to a Verity Collection. Searching a Verity Collection with Simple Search. Searching a Verity Collection with Explicit Search.13. User Authentication and Authorization.
Introduction. Logging in a User. Logging out a User. Authenticating a User. Obtaining the Logged-in User ID. Authorizing a Block of Code. Authorizing a Function. Authentication Example.
IV. DATABASE INTEGRATION.14. Structured Query Language (SQL).
Introduction. Inserting Data. Updating Data. Deleting Data. Selecting Data. Limiting Rows Returned. Specifying Multiple Conditions. Sorting Results. Using Aliases. Selecting from Multiple Tables. Joining Two Tables. Joining Three Tables. Grouping Data with CFOUTPUT. Performing Outer Joins. Selecting Unique Values. Using Aggregate Functions. Grouping Aggregate Data. Limiting Aggregate Results. Using the IN Keyword. Using IN with Web Forms. Matching a Wildcard Pattern. Matching a Single Character. Matching a Group of Characters. Matching a Range of Characters. Excluding a Group of Characters. Excluding a Range of Characters. Using Prepared Statements.15. Stored Procedures.
Introduction. Writing a Simple Stored Procedure in Microsoft SQL Server. Writing a Simple Stored Procedure in Oracle. Invoking a Simple Stored Procedure. Writing a Stored Procedure with Parameters in Microsoft SQL Server. Writing a Stored Procedure with Parameters in Oracle. Invoking a Stored Procedure with Parameters. Using Output Parameters. Working with Multiple Result Sets.
V. LANGUAGE EXTENSIBILITY FEATURES.16. User-Defined Functions.
Introduction. Declaring a Function. Function Arguments. Returning Values. Suppressing Output. Recursive Functions. Working with Function References.17. ColdFusion Custom Tags.
Introduction. Creating a Simple Custom Tag. Accessing a Custom Tag. Using Attributes. Returning a Result. Adding Start and End Tags. Building Nested Tags. Encoding Custom Tags. Using <cfmodule>. Using <cfimport>.18. CFX API Custom Tags.
Introduction. Creating a Simple Java CFX Tag. Using Tag Attributes. Setting ColdFusion Variables. Using Queries in Java CFX Tags. A Simple C++ CFX Tag. Using Tag Attributes. Setting ColdFusion Variables. Using Queries in C++ CFX Tags. Installing a Java CFX Tag. Installing a C++ CFX Tag.19. Components.
Introduction. Defining a Component. Instantiating a Component. Invoking a Component Method. Component Inheritance. Accessing a Component. Using Component Meta Data.20. Objects.
Introduction. Creating a Java Object Instance. Invoking Methods on an Object. Using Properties on an Object. Working with Java Objects. Working with COM Objects. Working with CORBA Objects.21. WDDX.
Introduction. Creating an XML Object with the <cfxml> Tag. Creating an XML Object with the XmlNew() Function. Creating an XML Object from Another XML Object. Parsing an XML Document. Accessing Attributes. Accessing Children. Accessing Inner Text. Searching XML with XPath. XSL Transformations.23. Web Services.
Introduction. Invoking a Web Service with CFINVOKE. Creating an Instance of a Web Service. Writing a Web Service. Using Properties. Deploying a Web Service. Invoking a Web Service with .NET. Invoking a Web Service with Java.24. J2EE Interoperability.
Introduction. Redirecting to a Servlet or JSP. Including a Servlet or JSP. Accessing ColdFusion Pages from Servlets and JSPs. Sharing Data Between ColdFusion and Servlets/JSPs. Accessing Enterprise Java Beans.
VI. APPENDIXES.Appendix A. Online ColdFusion Resources.
ColdFusion Web Sites. Java Web Sites. XML Web Sites. Other Useful Web Sites.Appendix B. Security.
Session Hijacking. URL Injection Hacking. File Uploading. Denial of Service Attacks. Cross Site Scripting. Sandbox Security. Security Resources.Appendix C. Migrating from ColdFusion 5 to ColdFusion MX.
ColdFusion Code Compatibility Analyzer. ColdFusion Settings Migration Wizard. Changes to CFML Tags and Functions. Database Operations. Localization. References.Appendix D. Converting Between Tags and Scripting.
The <cfscript> Tag. If-Then Statements. Loops. Switch Statements. Exception Handling.Index.