| ColdFusion
Definition
A web application server provides powerful
capabilities that are not available with
standard web technologies such as HTML.
ColdFusion was launched in 1995 by Allaire
Corporation, and was the first web application
server available for Windows NT. Among other
things, it is able to interact with databases,
track web page users, upload files to the
web server, send email, and perform logical
processing of data on the server. ColdFusion
is distinguished from other popular web
application servers because its actions
are programmed using a simple tag-based
scripting language called ColdFusion Markup
Language (CFML).
Macromedia bought Allaire Corporation
in early 2001, and added ColdFusion to the
Macromedia line of server products. It is
a prime candidate for even tighter integration
with Macromedia's industry-leading development
software (Dreamweaver, Flash etc), making
it a smart choice for any web developer.
What It Really Is
According to documentation, the ColdFusion
product consists of four components:
ColdFusion Server
ColdFusion Markup Language
ColdFusion Studio
ColdFusion Administrator
The key parts of ColdFusion are really the
ColdFusion server and CFML.
CFML is a scripting language designed specifically
for use by web developers. It is almost
unique in that it is tag-based. This makes
it easier for developers - used to working
in tag-based HTML - to learn. Because it
is specifically targeted at web development,
it also encapsulates common web functions
(such as connecting to a database) in single,
easy to use CFML tags. The same functions
might require several lines of code using
a competing technology such as ASP.
CFML, as implemented in ColdFusion 5, includes
over 75 tags and over 240 builtin functions.
It also allows developers to extend the
language by creating their own custom tags
or userdefined functions (UDF), or by integrating
COM, C++, and Java components.
The ease with which CFML can be learned,
and the simple but effective code that can
be written with it, are often cited as the
killer reasons to use ColdFusion over competing
technologies. In general, ColdFusion applications
can be written in less time, and often by
developers less experienced in programming.
CFML code is written directly into pages
on the web server, along with any HTML that
may be required on that page. Each page,
rather than being a normal web page, is
now a ColdFusion page (or "ColdFusion Template"
as Macromedia calls them). These pages are
given a .cfm or .cfml file extension (rather
than .htm or .html).
Advantages
+ Simple to learn and use, fast application
development time
+ Cross-platform - currently supported
on Solaris, Linux, Windows, HP-UX with
code compatibility between platforms
+ Comprehensive feature set including
built in graphing and charting functions,
and Verity search engine
+ Scales well to heavy loads
+ Well supported by authoring tools
+ Well documented
Disadvantages
+ ColdFusion's core features are extensive,
simple and effective. But extending its
features can involve added complexity
+ Costs more than competing platforms.
A freeware version is available, but feature
limited.
Examples
The following code retrieves values from
the tblMyTable.Word field in a database
called myDataSource. It then outputs them
all to a bulleted list on the same page.
|
Retrieve Values from Database,
output as bullet list
<!--- retrieve
the records --->
<cfquery name="myQuery" datasource="myDataSource"
dbtype="ODBC">
SELECT Word
FROM tblMyTable
ORDER BY Word
</cfquery>
<!--- output the records --->
<ul>
<cfoutput query="myQuery">
<li>#myQuery.Word#</li> </cfoutput>
</ul> |
|