Introduction to Macromedia ColdFusion MX 7 Training (3 days)
ColdFusion MX is the wildly popular server-side language that allows
non-programmers to quickly produce data-driven websites. Since the
content is stored in a database, the pages are created dynamically.
In addition to learning basic ColdFusion techniques, you will learn
basic database concepts using Microsoft Access, including how to
create Data Source Names (DSN), SQL statements and relational database
basics.
We will use real-life examples to show you how to query the database
using the <cfquery> tag and display your resulting records
using <cfoutput>, <cftable>, <cfselect> and more.
Additionally, we will create an administration section that will
allow you and your staff to add, edit or delete records in the database.
No previous database or programming experience is required. Knowledge
of HTML is all you will need! In class we will write our code from
scratch using Dreamweaver MX, ColdFusio Studio or HomeSite +, and
we will explore additional code writing options including ColdFusion
Studio, HomeSite+, BBedit and Notepad. (If you are interested in
using Dreamweaver's WYSIWYG functions to build dynamic pages, see
the class entitled "Using Dreamweaver MX to Build Data-Driven
Websites.")
Course Outline (3 days)
Part 1: Introduction to ColdFusion
- Static pages vs. Dynamic pages
- Server-side Web Technologies
- Database Alphabet Soup: ODBC/JDBC, DSNs and SQL
- Course Objectives and Prerequisites
- Introduction to Course Project
Part 2: ColdFusion Basics
- Using CFML
- Code Editors – Dreamweaver vs. HomeSite+
- Dreamweaver 8 Interface
- Arguments for use of Dreamweaver
- HomeSite+ / ColdFusion Studio Interface
- Arguments for use of HomeSite+ / ColdFusion Studio
- Tag Editing Dialog Boxes
- Embedded Tag Help
- Using ColdFusion Comments
- Creating Variables
- <cfset> and <cfoutput>
- Variable Scope/Prefixes
- Built-in ColdFusion Functions
- Insert Expression (HomeSite+ / ColdFusion Studio specific)
- CF Function Reference (Dreamweaver specific)
- Demo: Built-in Functions
- Demo: Date / Time Functions
- Using <cfinclude> to reuse code
- Demo: Create Header and Footer with <cfinclude>
- Exercise 1: Build Dynamic Page Footer using Variables and Date Functions
Part 3: Dynamic Data: Querying the Database
- Database Basics
- Introduction to SQL
- Select Statement
- Update Statement
- Insert Statement
- Delete Statement
- Data Source Name (DSN) / Remote Development Server (RDS)
- The DSN Used in This Class: movieList
- Course Project Database
- Querying the database with <cfquery>
- <cfdump> for Quick Output
- Exercise 2: Query the database
- Customizing Display with <cfoutput>
- Demo: Using <cfoutput>
- Building Dynamic Tables
- Shortcut: <cftable>
- Shortcut: Dynamic Table Tool (in Dreamweaver)
- Exercise 3: Display Resulting Records manually with <cfoutput>
Part 4: Creating a Drill-down Interface
- Passing Variables between Pages
- “Two-page method”
- Demo: Pass Variables via Links
- Demo: List of Actors with links
- Receive Variables through the URL
- Using a WHERE clause in a SQL Statement
- Exercise 4: Drill-down for More Detail
Part 5: Conditional Statements and Forms
- Conditional Statements
- <cfif>, <cfelseif> and <cfelse>
- Comparison Operators
- Operator
- Description
- Demo: Conditional Statements
- Using the isDefined() function
- Exercise 5: Conditional Statements – Data Validation
- HTML Form Review
- Demo: Pass Variable through a Form
- Exercise 6: Process Form Submission
- Self-Submitting Forms
- Using the <cfparam> tag to set a default value
- Fusebox: Perhaps the Ultimate Self-submitting Form
- Exercise 7: Self-submitting Form
- Dynamically Populating Select Lists
- HTML Review: <select> tags
- Demo: Dynamic Select List
- Introducing the <cfform> Tag
- Shortcut: <cfselect>
- Exercise 8: Create a Dynamic Select List
Part 6: Search Interface
- Creating a Search Interface
- Demo: Using the LIKE clause
- Using % and _ in a LIKE Statement
- Demo: Building Dynamic SQL Statements
- Exercise 9: Create a Search Interface
Part 7: Insert Records into the Database
- Inserting Records
- SQL Insert Statement
- Demo: Insert Record Step 1 – the Form
- Insert Record Step 2 – the Insert
- Shortcut: <cfinsert>
- Redirect Users with <cflocation>
- Important note about <cflocation>!
- Exercise 10: Insert a New Actor in the Database
- Automated Form Validation
- Client-side vs. Server-side validation: When does the validation code run?
- Exercise 11: Automatic Client-side (or Server-side) Form Validation
Part 8: Edit (Update) Database Records
- Updating records
- SQL UPDATE Statement Review
- Demo: Update Record Page 1 – select the record to edit
- Passing the Primary Key
- Page 2 – View Current Data in a Form
- Page 3 – Perform the Update to the Database
- Shortcut: <cfupdate>
- Exercise 12: Edit a Record
- Deleting Records
- Note on Deleting records
- Review of the SQL Delete Statement
- “Deleting” without deleting
- No <cfdelete>!
Part 9: Reusing Code
- Reusing code with <cfinclude> and <cflocation>
- Custom Tags
- Demo: custom tags
- Where to store Custom Tags
- Demo: Custom Tag with Parameters
- CALLER and ATTRIBUTE scopes
- Using <cfmodule>
- A Note about CFX tags
- Exercise 13: Calling a Custom Tag to Display a List of Years
- User Defined Functions (UDFs)
- Creating UDFs with the <cffunction> tag
- Using ColdFusion Components (CFCs)
- Creating Components
- Calling or Invoking Components
- Passing Arguments to Components
- The Component Code
- The main CFML page
- View a Component directly in the browser
- Exercise 14: UDFs
Part 10: Using Session Variables for Password Protection
- Session Variables
- Creating Password Protected Pages
- Password-protect.cfm (the included page)
- demo-password-form.cfm
- Application.cfm
- Locking Session and Application variables with <cflock>
- Exercise 15: Password Protecting Pages (optional)
Part 11: Tracking User Information with Cookies (optional)
- Demo: setting cookies
- Note: When Using Cookies and ColdFusion 5.0
- Exercise 16: Cookies
Part 12: Sending email with <cfmail> (optional)
- Using ColdFusion to Send Email
- <cfmail> Tag Syntax
- Demo: Sending an email
- Exercise 17: Sending Automated Emails
Appendicies
- Appendix A: Resources
- Appendix B: Set-up Notes
- Appendix C: Create a Dreamweaver “Site”
- Location of our course files
- Site Creation – Basic
- The Advanced Tab – Additional Categories:
- Site Files Panel
- “Create a Site” vs. “FTP or RDS Server Connection” 224
- Appendix D: Selecting Among ColdFusion Code Reuse Methods
See also:
Adobe ColdFusion 8 Training Courses
|
| |