ColdFusion
  Home arrow ColdFusion arrow Page 2 - Introduction to ColdFusion Markup Language
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
COLDFUSION

Introduction to ColdFusion Markup Language
By: Apress Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2006-01-19

    Table of Contents:
  • Introduction to ColdFusion Markup Language
  • Tags Used in CFML
  • The Application.cfm File
  • Understanding Common ColdFusion Tags
  • The cfif tag
  • The cfswitch tag
  • The cflocation tag

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introduction to ColdFusion Markup Language - Tags Used in CFML


    (Page 2 of 7 )

    Let's look at some of the tags that make up CFML. This section provides a quick overview of some of the most common tags and their use. This should give you a general idea of what ColdFusion MX 6.1 is capable of. Following later are descriptions and code snippets detailing how to use some of these tags in a ColdFusion page.

    ColdFusion MX 6.1 has more than 100 CFML tags, which Macromedia's documentation breaks down into the following categories:

    • Application framework
    • Database manipulation
    • Data output
    • Debugging
    • Exception handling
    • Extensibility
    • File management
    • Flow-control
    • Forms
    • Internet protocol
    • Page processing
    • Variable manipulation

    However, what's more important are the specific tags that you will discover you use every day in ColdFusion. Some of the more useful tags are:

    1. <cfchart>: Generates charts on the fly in a variety of formats, including.jpeg,.png, and.swf(Flash).
    2. <cfdirectory>: Performs directory management tasks and allows you to create, delete, rename, or list the contents of a directory.
    3. <cfdump>: Displays the contents of a variable to the screen for debugging purposes. Variables can contain simple values such as strings and numbers, or complex data such as Recordsets and structures.
    4. <cferror>: Tells ColdFusion how to handle errors that occur in your application.
    5. <cffile>: Performs file-management tasks and allows you to read, write, delete, move, rename, or append data to files on the server.
    6. <cfform>: Similar to HTML forms, except that it allows developers to take advantage of automatically generated JavaScript validation provided by the ColdFusion server.
    7. <cfftp>: Allows ColdFusion to FTP files to and from remote FTP sites.
    8. <cffunction>: Allows you to write your own custom functions using CFML tags.
    9. <cfhttp>: Allows you to post variables to remote sites, or grab the contents of a file on a different server.
    10. <cfif>: Performsif ... then ... elselogic in ColdFusion, running code only if certain conditions are met.
    11. <cfinclude>: Embeds other HTML or CFML code into the current document. This allows developers to break up larger files and reuse certain code/functions throughout the site.
    12. <cfinput>: Used in conjunction with the<cfform>tag to take advantage of built-in JavaScript validation.
    13. <cflocation>: Redirects the currently running page to a different page, or redirects users to a different site altogether.
    14. <cfloop>: Allows you to loop over Recordsets and structures a defined number of times, or while a certain condition is true.
    15. <cfmail>: Sends an e-mail to a single user or group of users.
    16. <cfmodule>: Allows you to call your own custom tags with ColdFusion.
    17. <cfoutput>: Used to output the value of a variable, or loop over a Recordset.
    18. <cfparam>: Checks to see if a certain variable exists; if not, it creates the variable and assigns a default value. It can also be used to validate the data type of a variable.
    19. <cfquery>: Used to pass SQL statements to a database.
    20. <cfqueryparam>: Used within<cfquery>to insert dynamic values into a SQL statement.
    21. <cfset>: Define the value of a variable.
    22. <cfstoredproc>: Execute a stored procedure (if supported by your database of choice).
    23. <cfswitch>: Passes control to a matching<cfcase>tag and evaluates passed expressions. This could be performed using a series of<cfif>tags, but this method saves space and simplifies things.
    24. <cftry>: Monitors a block of ColdFusion code and tries to catch any errors that may occur. It is used in conjunction with the<cfcatch>tag.

    ColdFusion also has a couple of special files that are triggered before or after every user request and can be used to hold site-wide variables or settings; we will look at these now.

    More ColdFusion Articles
    More By Apress Publishing


       · This article is an excerpt from the book "ColdFusion Web Development with...
     

    Buy this book now. This article is excerpted from chapter three of the book ColdFusion Web Development with Dreamweaver MX 2004, written by Jen and Peter deHaan et al. (Apress; ISBN: 1590592379). Check it out today at your favorite bookstore. Buy this book now.

    COLDFUSION ARTICLES

    - Adobe ColdFusion Just Got More RAD
    - How to Access a SQL Anywhere Database with C...
    - CFXML: Probing XMLDOM in ColdFusion
    - Creating a Web Service with ColdFusion: the ...
    - CFAjax: What it is and How to Use it
    - Querying SQL 2000 Server from ColdFusion
    - Introduction to ColdFusion Markup Language, ...
    - Introduction to ColdFusion Markup Language
    - Databases and Dreamweaver MX 2004, concluded
    - Databases and Dreamweaver MX 2004
    - Welcome to Coldfusion MX 6.1, concluded
    - Welcome to Coldfusion MX 6.1
    - What You Must Know About ColdFusion Flow-Con...
    - What You Must Know About Operators in ColdFu...
    - Everything You Must Know About ColdFusion Va...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    Stay green...Green IT