100% found this document useful (2 votes)
1K views44 pages

ColdFusion Overview & Features Guide

ColdFusion is a server-side scripting language that provides rapid application development features. It includes built-in capabilities for charting, searching, PDF generation, and connectivity to databases, LDAP directories, and other data sources. ColdFusion uses CFML (ColdFusion Markup Language) for its tag-based syntax. The upcoming version, ColdFusion 8, will add additional features for image manipulation, JSON serialization, and improved Ajax support.

Uploaded by

Ryan Stille
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
1K views44 pages

ColdFusion Overview & Features Guide

ColdFusion is a server-side scripting language that provides rapid application development features. It includes built-in capabilities for charting, searching, PDF generation, and connectivity to databases, LDAP directories, and other data sources. ColdFusion uses CFML (ColdFusion Markup Language) for its tag-based syntax. The upcoming version, ColdFusion 8, will add additional features for image manipulation, JSON serialization, and improved Ajax support.

Uploaded by

Ryan Stille
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to

ColdFusion
Ryan Stille
CF Web Tools
ryan@[Link]
[Link]

[Link]
Agenda
● What is ColdFusion
● Who uses ColdFusion
● Why would we want to use it / Features
● What I didn't cover
● The next version
● Resources
What is ColdFusion?
● Server side scripting language (CFML)
● The Adobe ColdFusion CFML engine
● The ColdFusion server is written in Java
● The language is tag based
● Runs on Windows, Linux, Unix, OSX
Who Uses ColdFusion?
● Everyone
● Some local companies include
– Union Pacific – Swanson Russell &
– Werner Trucking associates
– Mutual of Omaha
– Grace University
– NP Dodge
– Omaha Schools
– DTN
– Sergeants Pet Care
– National Equity
– Elisa Ilana
Where did it come from?
● Originally created by Allaire in 1995
● Allaire was bought by Macromedia in 2001
● Macromedia was bought by Adobe in 2005
● First version was extremely basic, but the later
versions are very powerful
● Version 6 (2002) was a complete rewrite – from
6.0 onward ColdFusion was written completely
in Java.
● Now on version 7.02. Ver. 8 is due mid 2007.
Why Use ColdFusion?
● Rapid Application Development
Why Use ColdFusion?
● Rapid Application Development
● Built in features
– Charting Engine
– Indexing and Searching
– PDF Generation
– Reporting Tool
– XML and XSLT
– Can talk to LDAP, POP, HTTP(s), FTP
– Task scheduling
Why Use ColdFusion?
● Built in features (cont.)
– GUI widgets such as a data grid
– Exception handling
– Session management
– Detailed debugging
– Remote Development Service
– Access to Java classes and methods
– IDE Support
– Can talk to any database that has a JDBC driver
ColdFusion Markup Language
<cfif expression>
<b>do stuff here</b>
<cfelse>
<i>else do this</i>
</cfif>
<cfscript>
function isUpperCase(character) {
if (Asc(character) gte 65 and Asc(character) lte 90)
return true;
return false;
}
</cfscript>
<cfscript>
// use Java to get hostname from an IP
function GetHostAddress(host) {
var iaddrClass = '';
var address = '';
iaddrClass = CreateObject("java", "[Link]");
address = [Link](host);
return [Link]();
}
</cfscript>
Queries are easy and clean
<cfquery name=”getUser” datasource=”MyDSN”>
SELECT fname, lname FROM users
WHERE userid = #[Link]#
</cfquery>

<cfoutput>
Hello #[Link]# #[Link]# !
</cfoutput>
Use cfqueryparam to prevent SQL injection
<cfquery name=”getUser” datasource=”MyDSN”>
SELECT fname, lname FROM users
WHERE userid =
<cfqueryparam value=”#[Link]#”
cfsqltype=”CF_SQL_INTEGER”>
</cfquery>

<cfoutput>
Hello #[Link]# #[Link]# !
</cfoutput>
Charting
<cfquery name="qryScores" datasource="MyDSN">
SELECT Student_ID, FinalTotal FROM Scores
</cfquery>

<cfchart format="jpg" show3d=”Yes” chartheight="400"


chartwidth="600">
<cfchartseries query="qryScores" itemcolumn="Student_ID"
valuecolumn="FinalScore" type="bar">
</cfchart>
Charting - Result
Searching Capabilities
● A version of the Verity K2 indexing/searching
server is bundled with ColdFusion
– scalable search engine based on a TCP/IP client-
server architecture
– Supports clustering
– Can populate from database
– File based indexing (spydering)
● Lucene
Verity – populating a collection
<cfquery name="qryContent" datasource="MyDSN">
SELECT id, articleContent, articleTitle FROM articles
</cfquery>

<cfindex collection="articleSearch" action="refresh"


query="qryContent" type="custom" body="articleContent"
title="articleTitle" key="id">
Verity – searching a collection
<cfsearch
name = "searchResults" collection = "articleSearch"
type = "criteria" criteria = "#[Link]#" >

<cfoutput query="searchResults">
Result #currentRow# -
<a href="[Link]?articleID=#key#">#title#</a>
</cfoutput>
PDF Generation

<cfdocument src="[Link] format="pdf" />


PDF Generation
<cfdocument format="pdf" filename=”/tmp/[Link]”>
<b>html here!</b>
<img src=”and_images_too.jpg”>
</cfdocument>
XML Support
<!--- fetch an RSS feed --->
<cfhttp
url="[Link]
method="GET" />

<!--- make an XML object out of the returned text --->


<cfset xmlDoc = XmlParse([Link])>

<!--- and take a look at it --->


<cfdump var="#xmlDoc#">
Other connectivity tags
● <cfldap>
● <cfpop>
● <cfhttp>
● <cfftp>
● <cfmail>
Query of a Query
<cfquery name=”qryUsers” datasource=”MyDSN”>
SELECT * FROM users
</cfquery>

<cfquery name=”QoQ” dbtype=”query”>


SELECT * FROM qryUsers WHERE state = 'NE'
</cfquery>
Query of a Query
<cfset OptData = [Link](symbol = 'GE')>

<cfquery name=”QoQ” dbtype=”query”>


SELECT * FROM OptData WHERE
OptExpireDate =
'#[Link][[Link]]#'
AND LastPrice <
#[Link][[Link]]#
ORDER BY LastPrice
</cfquery>
Session Management
● ColdFusion has various variable scopes:
– <cfset myVar = “foo”> places myVar into the
“variables” scope.
– Other scopes:
● Form
● URL

● Request

● CGI

● Cookie
Session Management
● Persistent Scopes:
– Session – these variables are placed into memory
– Client – placed in the client variables database
– Application – can be seen only by code using the
same application
– Server – Can be seen by all applications on a
server
Task Scheduling
● CF Administrator Demonstration
Debugging Features
● Demo
Development in ColdFusion
● Developer edition is free
● IDEs
– Dreamweaver has CFML syntax support
– Homesite+
– CFEclipse
Development in ColdFusion
● MVC Code Frameworks
– Fusebox
– Model Glue
– Mach II
● ORM Frameworks (Object Relational Mapping)
– Transfer
– Reactor
Development in ColdFusion
● Dependency Injection
– ColdSpring
– LiteWire
● Unit Testing
– CfUnit
– CFCUnit
Development in ColdFusion
● Remote Development Service
– Allows you to connect to a ColdFusion server and
open/edit files on that machine
– Supported in HomeSite and CFEclipse
What I didn't cover
● OO (Components)
● [Link] / .cfm
● Flash/Flex Integration
● Gateways
● Reports
● Flash Forms
Whats coming in ColdFusion 8
● <cfimage> - image manipulation
● Sharpen, blur, crop, resize, rotate, etc.
● Also a full low-level drawing API that allows lines,
shapes, text, etc. to be overlaid on existing images.
● Serialize and deserialize JSON
● Ajax grids using <cfgrid>
● More Eclipse integration, including a real time
log viewer
● .NET Integration - CreatObject() can invoke
.NET objects. Even on non-windows platforms
Whats coming in ColdFusion 8
● <cfexchangeconnection> - integration with MS
Exchange
● <CFPDF> and <CFPDFForm>
– gets PDFmetadata, merge pdfs, extract pages,
encrypt, create a thumbnail page, flatten pdfs,
protect, execute ddx instruction sets.
● A lot of AJAX Stuff
– AJAX proxy allows you to call ColdFusion objects
and functions from within JavaScript
– AJAX data logging window
Whats coming in ColdFusion 8
● A lot of AJAX Stuff (cont.)
– Easy auto suggest:
● Statically: <cfinput type="text" name="breed"
autosuggest="Bengal,Birman,British
Shorthair,Burmese,Egyptian Mau,Exotic
Shorthair,Persian" >
● Ajaxified: <cfinput type="text" name="breed"
autosuggest="cfc:[Link]({cfautosuggestvalue})" >
● On demand presentations
● Scorpio is much faster than CF7
Whats coming in ColdFusion 8
● Threading!
– <cfthread action=” run | join | sleep | terminate” ...>
– Can get thread metadata (elapsed time, error,
name, output, priority, starttime, status.)
● New Server Monitoring/Administration tool
– View/kill active threads
– View executing pages, queries, etc. - sorted by
time, memory, etc.
– Can monitor multiple servers on one screen
– The API used for the server monitoring is public
Whats coming in ColdFusion 8
● Run PHP/Ruby etc from within CF ????
<cfset who = "Sean" />
<cf_php>
<?php
echo "Hello ".$_COLDFUSION["who"]."<br />";
$_COLDFUSION["greeting"] = "wibble";
?>
</cf_php>
<cfoutput>greeting = #greeting#</cfoutput>
Whats coming in ColdFusion 8
● How is this possible? ColdFusion 8 uses Java 6 which
provides access to the [Link] package and all the
J-language implementations available. Quercus is a
Java implementation of PHP and it is implemented as
a script engine.
Resources
● Nebraska ColdFusion Users Group - [Link]
– Meets the 4th Tues of every month
– Many give-a-ways
– Special Speakers from Adobe and other companies
● ColdFusion Blog Aggregators
– [Link]
– [Link]
● Mailing Lists
– [Link]
● Many conferences around the country
– Adobe Max, CF United, [Link]
Resources (cont.)
● Podcasts
– ColdFusion Weekly - [Link]
– Out Loud - [Link]
– The ColdFusion Podcast - [Link]
– ColdFusion Muse - [Link]
● Developer Edition is free - [Link]/coldfusion
● ColdFusion 8 Beta -
[Link]
● Free CF8 Hosting - [Link]
THE END

You might also like