Advanced ColdFusion 9: Components, Error Handling and Complex Objects

ColdFusion Training Course Duration

2 Days

ColdFusion Training Course Outline

Module 1: Course Introduction and <cfchart>

  • Introduction
  • Course Objectives
  • Course Prerequisites
  • Course Project
  • Exercise 1: Set-up Course Files and Data Sources (DSNs)
Charting and Graphing Options
  • Demo: Basic Charts
  • Using <cfchart> vs. <cfchartseries>
  • Demo: Linking from a chart to another page
  • Demo: <cfchartdata> to manually add data
  • Caching Charts
  • Demo: Save charts for future use with <cffile>
  • Exercise 2: Create a chart with <cfchart>
  • Possible Solution to Exercise 2
Module 2: Manipulating Complex Data Objects (Lists, Arrays, Structures and Queries)
  • Scalar Variables
  • Lists
  • Arrays
  • Structures
  • Exercise 3: Arrays and Lists
  • Possible Solution to Exercise 3
Looping with <cfloop>
  • Syntax of <cfloop>
  • Weeding Out the FIELDNAMES Variable
  • Using <cfloop> for automatic query output
  • Display Web-safe Colors using CFLOOP
  • Exercise 4: Display results with <cfloop>
  • Possible Solution to Exercise 4
Queries of Queries
  • Demo: Query of Query
  • Exercise 5: Query of query to display “classic movies”
  • Possible Solution to Exercise 5
Module 3: CFCs - Building ColdFusion Components
  • Benefits to using CFCs
  • Creating Components
  • Access control
  • Calling or Invoking Components
  • Passing Arguments to Components
  • The main CFML page
  • Three Ways to Pass Arguments
  • Where to save CFCs
  • Self-documenting - View a Component directly in the browser
  • Exercise 6: Creating ColdFusion Components with Arguments
  • A Possible Solution to Exercise 6
Object-Oriented CFCs
  • Object-Oriented Principles
  • Demo: CFC using Object-Oriented Model
  • How does use of a CFC compare to other OO languages?
  • Demo: CFC using Object-Oriented Model
  • Inheritance
  • Demo: Inherit from another CFC
  • Exposing CFCs as Web Services
  • Exercise 7: Build OOP CFC with Parameters to Edit Courses
  • A Possible Solution to Exercise 7
Module 4: Application Framework
  • Automatic Includes: Application.cfm and onRequestEnd.cfm
  • New Application Framework: Application.cfc
  • Exercise 8: Store DSN and Company Name as Application Variables
  • Possible Solution to Exercise 8
  • Using Application Variables
  • Exercise 9: Cycle through Featured Movies Using Application Variables
  • Possible Solution to Exercise 9
Module 5: Errors and Exceptions

Standard Error Handling
  • Application.cfm
  • Demo: the error page
  • Demo: detailed error page
  • Exercise 10: Replace the Default Error Page
  • Possible Solution to Exercise 10
Structured Error Handling
  • <cftry> and <cfcatch>
  • Demo: Using <cftry>
Transactions with <cftransaction> and <cftry>
  • Classic <cftransaction> example
  • Demo: Using <cftransaction> with <cftry>
  • Exercise 11: Using <cftry> to Avoid Errors
  • Possible Solution to Exercise 11
Module 6: Reusing Code
  • Limited Capabilities of <cfscript>
  • Syntax Rules
  • Reserved Words
  • Looping with <cfscript>
  • GetTickCount() - testing the speed of your code
  • Exercise 12: Setting Variables with <cfscript>
  • Possible Solution to Exercise 12
Custom Tags
  • Demo: custom tags
  • Where to store Custom Tags
  • Demo: Custom Tag with Parameters
  • CALLER and ATTRIBUTE scopes
  • Using <cfmodule>
  • Exercise 13: Using Custom Tags
  • Possible Solution to Exercise 13
Stored Procedures
  • Benefits of Stored Procedures
  • Demo: Stored Procedure
  • Demo: pass a parameter to a stored procedure
  • Exercise 14: Pass Parameters to a Stored Procedure
  • Possible Solution to Exercise 14
Showing portions of a Recordset
  • Paging through records
  • Exercise 15: Add “Next” and “Previous” links to the Actors list
  • Possible Solution to Exercise 15
Module 7: Advanced Validation with Regular Expressions (optional)
  • Special Symbols for Matching Specific Characters
  • Specify the number of occurrences
  • Placement of the pattern
  • POSIX Syntax
  • Perl Syntax
  • Demo: Testing Regular Expressions
  • Exercise 16: Using Regular Expressions for Advanced Form Validation
  • Possible Solution to Exercise 16
Appendix A: Resources

Appendix B: Set-up Notes

Appendix C: Selecting Among ColdFusion Code Reuse Methods

Wintrac Inc.
16523 SW McGwire Ct.
Beaverton OR 97007
© Wintrac, Inc. All rights reserved.                                                                               Site Map   |   Terms of Use   |   Privacy Policy