16
Chapter 2: CFML Basics
Working with ColdFusion pages
As discussed in
Chapter 1, “Introducing ColdFusion MX,” on page 11
, ColdFusion pages are
plain text files that you use to create web applications. You can create your ColdFusion
applications by writing all the code manually or by using wizards (provided with some editors) to
generate the majority of the code for you.
You can use the following editors to create your ColdFusion pages:
•
Macromedia Dreamweaver MX
•
Macromedia H
•
Macromedia ColdFusion Studio
•
Any HTML editor
•
Windows Notepad
•
VI or EMACS (UNIX® systems)
The best choice for creating ColdFusion pages is Macromedia Dreamweaver MX. Dreamweaver
MX includes many CFML features for building applications, such as rapid visual development,
robust CFML editing, and integrated debugging. Dreamweaver MX also includes a copy of
H for users who are familiar with developing their application code using ColdFusion
Studio or HomeSite 5. H combines all the features of ColdFusion Studio and HomeSite
5, along with support for the latest ColdFusion MX tags. For more information, see
Chapter 4,
“Configuring Your Development Environment,” on page 37
.
Note:
This book shows how to create ColdFusion applications by writing your code manually. It does
not address how to create ColdFusion pages by generating code with wizards. For information about
using wizards to generate CFML code, see the product documentation for Dreamweaver MX and
H.
Creating a ColdFusion page
Creating a ColdFusion page involves using tags and functions. The best way to understand this
process is to create a ColdFusion page.
In the following procedure, you will create a simple ColdFusion page by using HTML tags, one
ColdFusion tag, and two ColdFusion functions. The following table briefly explains the
ColdFusion tags and functions:
Note:
ColdFusion tags and functions are considered primary elements of CFML. You will learn more
about these elements and others later in this book.
Element
Description
Now()
A function supported in CFML that you can use to retrieve information from your
system.
You will use the
Now()
function in the following procedure to return the current date
that is retrieved from your system.
DateFormat()
A function that instructs ColdFusion to format the date returned by the
Now()
function.
cfoutput
A ColdFusion tag that you use to return dynamic data (data retrieved from a
database) to a web page.
You will use the
cfoutput
tag in the following procedure to display the current date
retrieved from your system.
Summary of Contents for COLDFUSION MX 61-GETTING STARTED BUILDING COLDFUSION...
Page 1: ...Getting Started Building ColdFusion MX Applications...
Page 6: ...6 Contents...
Page 10: ......
Page 30: ...30 Chapter 2 CFML Basics...
Page 36: ...36 Chapter 3 Database Fundamentals...
Page 48: ......
Page 76: ...76 Chapter 6 Lesson 2 Writing Your First ColdFusion Application...
Page 134: ...134 Index...