Home > Articles > Mobile Application Development & Programming > HTML5 & Web Standards

  • Print
  • + Share This
From the author of

From the author of

CFML: The ColdFusion Markup Language

Let's take a moment to see how the language itself looks.

The ColdFusion Markup Language consists of about 80 tags and nearly 200 functions. The tags can be generally classified in one or sometimes two of these categories:

  • Database manipulation

  • Data output

  • Exception (error) handling

  • Variable manipulation

  • Flow control

  • Internet protocol

  • Java servlets and Java objects

  • File management

  • Web application framework

  • Advanced ColdFusion forms

  • Extensibility

  • Miscellaneous tags

ColdFusion tags all begin with <CF so that the ColdFusion engine knows that it's supposed to interpret them. Just like HTML, there are tags that do not require an end tag (such as <CFSET>) and tags that do (such as </CFOUTPUT>).

When a Web page that is a ColdFusion template (saved with the .cfm extension) is called, ColdFusion interprets the CFML on the page, performs whatever operations are required by the markup, and generates an HTML page from this, which it returns to the client browser.

Generally, when you write ColdFusion tags, you do so in the complete IDE for ColdFusion called ColdFusion Studio. Studio has built-in FTP and even remote development. It is a terrific boon to writing Web applications, even in PHP, ASP, or XHTML. So, let's take a look at the language.

Maybe you're familiar with Java variables, like these:

boolean Flag
int TimesDisplayed

These Java variables declare first their type and then the name of the variable. ColdFusion is a typeless language. That means that we don't need to specify a variable's type. ColdFusion will handle that for you. So, let's set a variable and output it to the browser:

<!----set the first name variable--->
<cfset FirstName = "Eben">

<!----output it to the browser--->
<cfoutput>Hello, #FirstName#</cfoutput>!

Saving this with a .cfm extension and loading it displays Hello, Eben! in the browser.

You don't have to declare the variable as a string type. You won't have to do a bunch of escaping or line returns as you do in PHP, which can make code rather cumbersome to sort through.

ColdFusion is a terrific language to learn. If you haven't done much application development, ColdFusion makes a perfect first Web programming language after learning HTML. If you are a seasoned pro accustomed to ASP, JSP, or PHP, I think you'll be delighted to find how much faster you can accomplish the same tasks you're used to. Pick up a copy of my book, Core ColdFusion 5. Written by a developer for developers, it's the smartest way to start writing complete ColdFusion applications fast. Included with the book are thousands of lines of code demonstrating complete, working ColdFusion applications. You'll be up and running in no time.

  • + Share This
  • 🔖 Save To Your Account