ColdFusion
  Home arrow ColdFusion arrow Page 2 - Jump Start To ColdFusion MX
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

Jump Start To ColdFusion MX
By: Clint Tredway
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2002-09-24

    Table of Contents:
  • Jump Start To ColdFusion MX
  • What Is ColdFusion?
  • Showing The Results Of A Query
  • Looping In ColdFusion
  • Form Handling
  • Conclusion

  • 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


    Jump Start To ColdFusion MX - What Is ColdFusion?


    (Page 2 of 6 )

    Let's begin with what ColdFusion is. ColdFusion is really two things. First off, ColdFusion is an application server that runs on multiple platforms. These platforms include Windows, Linux, Solaris, and HP Unix. Second, ColdFusion is a scripting language that allows for rapid application development.

    ColdFusion has a very simple syntax that follows HTML syntax. Here's a simple example:

    <cfset myvar = "Hello World">

    This example sets a variable named myvar with the value of "Hello World". Because of this simple syntax, ColdFusion programmers can create web applications a lot quicker than they could be using many other scripting languages.

    I am now going to go over some simple syntax of the ColdFusion language. First, let's discuss how to set a variable in ColdFusion. To set a variable to a specific value, the <cfset> tag is used. Here is an example of the syntax to set a variable called myvar to a string value of "ColdFusion Rocks!".

    <cfset myvar = "ColdFusion Rocks!">

    Now, I hear you saying, "Well that does me no good unless I can output the contents of the variable", so here's how you would output the variable:

    <cfoutput>#myvar#</cfoutput>

    Ok, lets talk about the last code snippet. All ColdFusion variables are enclosed in pound (#) signs and to output those variables, they are enclosed in <cfoutput> tags.

    Now, the <cfoutput> tag is your friend. Not only does it output variables, but it can also loop through query results. Since I have just brought up the subject of queries, let talk about how to query a database. Following the naming convention of other CF tags, the <cfquery> tag is used to query a database. Here’s an example of a database query in ColdFusion:

    <cfquery name="myQuery" datasource="MyDSN">
    Select col1, col2 from anytable
    </cfquery>


    Let's breakdown this example so that you will know what's going on. The 'name' attribute tells ColdFusion how to reference the query result that this query is generating. The 'datasource' attribute tells ColdFusion what database or DSN to connect to in order to execute the query inside of the <cfquery> tag. Almost all SQL statement can be executed inside a <cfquery> tag. Generally speaking, 99% of all SQL queries will run inside this tag.

    More ColdFusion Articles
    More By Clint Tredway


     

    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 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek