Home arrow ColdFusion arrow Page 2 - Jump Start To ColdFusion MX
COLDFUSION

Jump Start To ColdFusion MX


Yearning to become a ColdFusion buff? If so, then start with this article -- Clint introduces us to ColdFusion MX using coding examples and great explanations.

Author Info:
By: Clint Tredway
Rating: 4 stars4 stars4 stars4 stars4 stars / 9
September 24, 2002
TABLE OF CONTENTS:
  1. · Jump Start To ColdFusion MX
  2. · What Is ColdFusion?
  3. · Showing The Results Of A Query
  4. · Looping In ColdFusion
  5. · Form Handling
  6. · Conclusion

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

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.
blog comments powered by Disqus
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...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials