ColdFusion
  Home arrow ColdFusion arrow 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


    (Page 1 of 7 )

    If you want to get a good start on learning ColdFusion, look no further. This article covers a whole bunch of CFML tags and some basic functions. It is the first of two parts, and 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).

    COLDFUSION MARKUP LANGUAGE (CFML) is ColdFusions own set of tags that makes up the bulk of the dynamic functionality found on ColdFusion pages. CFML has two different parts that make ColdFusion work: tags and functions. In this chapter we cover a whole bunch of CFML tags and also some basic functions. Chapter 4 shows you how to use some of the more advanced functions and teaches you about variable scopes and different data types.

    Tags are used to carry out operations, such as looping over Recordsets, uploading files to a web server by way of a web form, dumping the contents of a variable to the screen for debugging, and grabbing the contents of a remote page on the Web. Functions within ColdFusion are used to manipulate data or perform calculations. For example, ColdFusion has a function called #ArrayAvg()#, which calculates the average of the numeric values within an array. You often must use tags and functions together to build a completely functional site.

    Introducing CFML

    HTML and ColdFusion tags can exist together within a document that is requested from a web server. All ColdFusion tags start with <cf. The ColdFusion server will process anything within these tags, ignoring any plain HTML tags. The server will return any HTML generated by processing your ColdFusion tags, and then the entire page is returned to the user's browser. Other things to note about CFML include:

    • Whenever using ColdFusion tags within a document, you must save it as a.cfmfile for it to be recognized and interpreted by the ColdFusion server.
    • In text strings, all text is considered literal unless it is within a set of pound/hash (#) signs.
    • ColdFusion elements (the opening and closing tags, and everything in between) are called blocks. For example, if you were using a<cfif>element in your code, it would be called the<cfif>block.
    • To add comments inside ColdFusion tags, you must use CFML comment delimiters:<!--- CFML comment --->. Notice that these are similar to HTML comments, but have three dashes instead of two. If you use HTML comments inside your CFML, they will not be ignored by the ColdFusion server as expected, and you will either get errors or will dynamically create HTML comments. Also, CFML comments will not send text back to the users browser like HTML comments do.

    Now we provide a general overview of the many categories of tags, and the most common ones you will be likely to use in your work. We then go through some of these tags in detail, along with the functions that help these tags work and make your applications run.

    TIP   You can also extend ColdFusion by writing your own custom tags using CFML, or even Java or C++. Writing custom tags is covered in more detail in Chapter 10. Custom tags written in ColdFusion are prepended with CF_, whereas any custom tags written in Java or C++ are prepended by CFX_.

    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