|
This article or section does not adequately cite its references or sources. Please help improve this article by adding citations to reliable sources. (help, get involved!) This article has been tagged since July 2006. - This article is about the computer programming language. For the nuclear reactions, see Cold fusion.
ColdFusion is an application server and software development framework used for the development of computer software in general, and dynamic web sites in particular. In this regard, ColdFusion is a similar product to Microsoft ASP.NET or Java Enterprise Edition. Image File history File links Information_icon. ...
Doctor Who novel, see Cold Fusion (Doctor Who). ...
Image File history File links Coldfusionmx7logo. ...
This article or section does not cite its references or sources. ...
A website (or Web site) is a collection of web pages, images, videos and other digital assets and hosted on a particular domain or subdomain on the World Wide Web. ...
ASP.NET is a set of web application development technologies marketed by Microsoft. ...
Java Platform, Enterprise Edition or Java EE (formerly known as Java 2 Platform, Enterprise Edition or J2EE up to version 1. ...
The primary feature of ColdFusion is its associated scripting language, ColdFusion Markup Language (CFML), which compares to JSP, C#, or PHP and resembles HTML in syntax. "ColdFusion" is often used synonymously with "CFML", but it should be noted that there are additional CFML application servers besides ColdFusion, and that ColdFusion supports programming languages other than CFML, such as server-side Actionscript. CFML is the name of the scripting language used by ColdFusion, Blue Dragon, and other web development platforms. ...
JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request. ...
The title given to this article is incorrect due to technical limitations. ...
PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages. ...
HTML, short for HyperText Markup Language, is the predominant markup language for the creation of web pages. ...
ActionScript is a scripting language based on ECMAScript, primarily used to develop software for the Adobe Flash . ...
Originally a product of Allaire, in 2001 the company was purchased by Macromedia, who subsequently were acquired by Adobe Systems in 2005. Allaire Corporation, founded by Jeremy and JJ Allaire, released the first version of the ColdFusion server in 1995, the first database-driven web-content server. ...
Macromedia was an American graphics and web development software house headquartered in San Francisco, California. ...
This article or section does not adequately cite its references or sources. ...
ColdFusion is most often used for data-driven web sites or intranets. More advanced developers can use ColdFusion as a productivity layer above a J2EE platform or use ColdFusion as middleware in a service oriented architecture (SOA), generating SOAP or RESTful web services or Flash remoting. A website (or Web site) is a collection of web pages, images, videos and other digital assets and hosted on a particular domain or subdomain on the World Wide Web. ...
An intranet is a private computer network that uses Internet protocols, network connectivity, and possibly the public telecommunication system to securely share part of an organizations information or operations with its employees. ...
Java 2 Platform, Enterprise Edition or J2EE is a Standard (albeit with no ISO or ECMA standard) for developing distributed Multi-tier architecture applications, based on modular components running on an application server. ...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
In computing, the term Service-Oriented Architecture (SOA) expresses a software architectural concept that defines the use of services to support the requirements of software users. ...
This article is about the computer protocol. ...
Rest may refer to: rest (fitness), a period of relative inactivity to allow recovery and growth. ...
The W3C defines a Web service[1] as a software system designed to support interoperable Machine to Machine interaction over a network. ...
It has been suggested that FutureSplash Animator be merged into this article or section. ...
ColdFusion can also handle asynchronous events such as SMS and instant messaging via its gateway interface, available in ColdFusion MX 7 Enterprise Edition. SMS arrival notification on a Siemens phone Received and displayed SMS message on a Motorola RAZR handset. ...
A screenshot of PowWow, one of the first instant messengers with a graphical user interface Instant messaging or IM is a form of real-time communication between two or more people based on typed text. ...
ColdFusion provides a number of value-added services out of the box: - conversion from HTML to PDF and FlashPaper
- client-side form validation including rich forms using Flash
- GUI widgets such as datagrids and date pickers
- platform-independent database querying via ODBC or JDBC
- data retrieval from common enterprise systems such as Active Directory, LDAP, POP, HTTP, FTP
- client and server cache management
- session, client, and application management
- file indexing and searching service based on Verity K2 (Enterprise Edition only)
- XML parsing, querying, and validation
- Server clustering
- GUI administration
- Task scheduling
Other implementations of CFML offer similar or enhanced functionality, such as running in a .NET environment or image manipulation. In computing, HyperText Markup Language (HTML) is a markup language designed for the creation of web pages and other information viewable in a browser. ...
Portable Document Format (PDF), sometimes mistaken for Printable Document Format, is an open file format created by Adobe Systems in 1993 and is now being prepared for submission as an ISO standard[1]. It is used for representing two-dimensional documents in a device independent and resolution independent fixed-layout...
Macromedia FlashPaper 2 is a software application supplied by Macromedia. ...
A graphical user interface (or GUI, often pronounced gooey), is a particular case of user interface for interacting with a computer which employs graphical images and widgets in addition to text to represent the information and actions available to the user. ...
A widget (or control) is an interface component that a computer user interacts with, such as a window or a text box. ...
In computing, Open Database Connectivity (ODBC) provides a standard software API method for using database management systems (DBMS). ...
Java Database Connectivity, or JDBC, is an API for the Java programming language that defines how a client may access a database. ...
Typically Active Directory is managed using the graphical Microsoft Management Console. ...
In computer networking, the Lightweight Directory Access Protocol, or LDAP (IPA: ), is a networking protocol for querying and modifying directory services running over TCP/IP. A directory is a set of information with similar attributes organized in a logical and hierarchical manner. ...
In computing, local e-mail clients use the Post Office Protocol version 3 (POP3), an application-layer Internet standard protocol, to retrieve e-mail from a remote server over a TCP/IP connection. ...
Hypertext Transfer Protocol (HTTP) is a method used to transfer or convey information on the World Wide Web. ...
FTP or File Transfer Protocol is used to transfer data from one computer to another over the Internet, or through a network. ...
This article should be split into multiple articles accessible from a disambiguation page. ...
The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language that supports a wide variety of applications. ...
This article or section does not adequately cite its references or sources. ...
History
Image File history File links Download high-resolution version (781x602, 132 KB) This is a copyrighted image that has been released by a company or organization to promote their work or product in the media, such as advertising material or a promotional photo in a press kit. ...
Image File history File links Download high-resolution version (781x602, 132 KB) This is a copyrighted image that has been released by a company or organization to promote their work or product in the media, such as advertising material or a promotional photo in a press kit. ...
A floppy disk is a data storage device that is composed of a disk of thin, flexible (floppy) magnetic storage medium encased in a square or rectangular plastic shell. ...
Early versions The first version of ColdFusion (then called Cold Fusion) was released in 1995. This first version was written almost entirely by one person, JJ Allaire. Primitive by modern standards, early versions of ColdFusion did little more than database access.[1] In 1995 Joseph J. (JJ) Allaire co-founded Allaire Corporation with his brother Jeremy Allaire, creating the web development tool Cold Fusion. ...
All versions of ColdFusion prior to 6.0 were written using Microsoft Visual C++. This meant that ColdFusion was largely limited to running on Microsoft Windows, although Allaire did successfully port ColdFusion to Sun Solaris starting with version 3.1. This article or section does not cite its references or sources. ...
Microsoft Windows is the name of several families of proprietary software operating systems by Microsoft. ...
SUN redirects here. ...
Solaris is a computer operating system developed by Sun Microsystems. ...
Releases 1995 Allaire Cold Fusion version 1.0 1996 Allaire Cold Fusion version 1.5 1997, Jun Allaire Cold Fusion version 3.0 1998, Jan Allaire Cold Fusion version 3.1 1998, Nov Allaire ColdFusion version 4.0 (space eliminated between Cold and Fusion to make it ColdFusion) 1999, Nov Allaire ColdFusion version 4.5 2001, Jun Macromedia ColdFusion version 5.0 2002, May Macromedia ColdFusion MX version 6.0 2003, Oct Macromedia ColdFusion MX version 6.1 2005 Macromedia ColdFusion MX 7 2007? Adobe ColdFusion MX 8
ColdFusion MX Prior to 2000, Allaire began a project codenamed "Neo", that would rewrite the basis of ColdFusion using Java, which would allow for greater portability among different platforms. The Java platform is the name for a computing environment, or platform, from Sun Microsystems which can run applications developed using the Java programming language and set of development tools. ...
On January 16, 2001, Allaire announced that it would be merging with Macromedia. Shortly after the merger, Macromedia continued with the incremental release of ColdFusion 5.00 and in June 2002, Macromedia released Macromedia ColdFusion MX (6.0), extending the naming convention of Macromedia's line of products. ColdFusion MX was completely rebuilt from the ground up and was based on the Java 2 Platform, Enterprise Edition (J2EE) platform. ColdFusion MX was also designed to integrate well with Macromedia Flash using Macromedia Flash Remoting MX. January 16 is the 16th day of the year in the Gregorian calendar. ...
2001 (MMI) was a common year starting on Monday of the Gregorian calendar. ...
Java 2 Platform, Enterprise Edition or Java EE (formerly also J2EE) is a programming platform â part of the Java platform â for developing and running distributed multi-tier architecture applications, based largely on modular components running on an application server. ...
Java 2 Platform, Enterprise Edition or J2EE is a Standard (albeit with no ISO or ECMA standard) for developing distributed Multi-tier architecture applications, based on modular components running on an application server. ...
// == Macromedia Flash == ==]] Using Macromedia Flash 8 (bundled in Studio 8) in Windows XP. Maintainer: Adobe Systems (formerly Macromedia) Latest release: 8 / September 30th, 2005 OS: Windows (no native Windows XP Professional x64 Edition support), Mac OS X, Linux (i386 only, via wine [1]) Use: Multimedia Content Creator License: Proprietary Website...
Starting from the MX (6.0) release, ColdFusion is compiled to bytecode, like JSP and ASP.NET. The compiled .class files are readily accessible, and are cached until their source changes, like JSPs. A compiler is a computer program that translates a computer program written in one computer language (called the source language) into an equivalent program written in another computer language (called the output or the target language). ...
Bytecode is a binary representation of an executable program designed to be executed by a virtual machine rather than by dedicated hardware. ...
JavaServer Pages (JSP) is a Java technology that allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request. ...
ASP.NET is a set of web application development technologies marketed by Microsoft. ...
With the release of ColdFusion MX, the CFML language was also extended to support basic OOP. Apart from the tag-based CFML syntax, ColdFusion supports embedded scripts that can be written in a JavaScript-like language, known as CFScript. Object-oriented programming (OOP) is a programming paradigm that uses objects to design applications and computer programs. ...
JavaScript is the name of Netscape Communications Corporations and now the Mozilla Foundations implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. ...
CFScript is an extension of CFML on the ColdFusion platform. ...
Current version With the release of ColdFusion 7.0, the naming convention was amended, rendering the product name "Macromedia ColdFusion MX 7". CFMX 7 added Flash-based, and XForms-based, web forms and a report builder that output in Adobe PDF as well as Flash Paper, RTF and Excel. The Adobe PDF output is also available as a wrapper to any HTML page, converting that page to a quality printable document. The enterprise edition also added Gateways. These provide interaction with non-HTTP request services such as IM Services, SMS, Directory Watchers, and an asynchronous execution. XML support was boosted in this version to include native schema checking. Portable Document Format (PDF) is a file format developed by Adobe Systems for representing documents in a manner that is independent of the original application software, hardware, and operating system used to create those documents. ...
See FlashPaper, a Macromedia Flash-based inline document viewer. ...
The Rich Text Format (often abbreviated to RTF) is a proprietary document file format developed and owned by Microsoft since 1987 for cross-platform document interchange. ...
This article or section does not adequately cite its references or sources. ...
Gateway has several meanings. ...
ColdFusion MX 7.0.2, codenamed "Mystic" includes advanced features for working with Adobe Flex 2.
Future Development is underway at Adobe for a version 8 of ColdFusion, codenamed "Scorpio", scheduled to be released by the second half of 2007. The focus for Scorpio is innovation. Confirmed new features for Scorpio are the cfpdfform tag, which enables integration with Adobe PDF forms, some image manipulation functions, Microsoft .Net integration, and the cfpresentation tag, which appears to allow creating and integrating with live Macromedia Breeze presentations. The CF Administrator is also reported to have a new Flex 2 interface, and there will be built-in server monitoring. These features were demonstrated at CFUnited 2006 and MAX conferences, and at CFDevCon 2006 in the uk. Portable Document Format (PDF) is a file format developed by Adobe Systems for representing documents in a manner that is independent of the original application software, hardware, and operating system used to create those documents. ...
Microsoft . ...
Macromedia Breeze is software used with Microsoft PowerPoint to create powerful marketing, information and general presentations, learning modules and more. ...
CFUNITED is an annual conference by and for ColdFusion developers. ...
Rich forms With its newest release, Macromedia included a subset of its Macromedia Flex 1.5 technology. Its stated purpose is to allow for rich forms in HTML pages using CFML to generate Flash movies. These Flash forms can actually be used to implement rich internet applications, but with limited efficacy due to the ActionScript restrictions in place on Flash forms by Macromedia. Macromedia Flex is an umbrella term for a group of technologies initially released in March of 2004 by Macromedia to support the development and deployment of rich internet applications based on their proprietary Macromedia flash platform. ...
Flash forms also provide additional widgets for data input, such as date pickers and data grids. In previous versions of ColdFusion, some form validation and additional widgets were available using a combination of Java applets and JavaScript. This option persists for those who do not wish to use Flash, however not all features are supported. An example: <cfform format="flash" method="post" width="400" height="400"> <cfinput type="text" name="username" label="Username" required="yes" > <cfinput type="password" name="password" label="Password" required="yes" > <cfinput type="submit" name="submit" value="Sign In" > </cfform> ColdFusion also includes some XForms capability, and the ability to "skin" forms using XSLT. XForms is two things: 1. ...
...
PDF and FlashPaper generation ColdFusion can generate PDF or FlashPaper documents using standard HTML (i.e. no additional coding is needed to generate documents for print). CFML authors simply place HTML and CSS within a pair of cfdocument tags and specify the desired format (FlashPaper or PDF). The generated document can then either be saved to disk or sent to the client's browser. PDF is an abbreviation with several meanings: Portable Document Format Post-doctoral fellowship Probability density function There also is an electronic design automation company named PDF Solutions. ...
Macromedia FlashPaper 2 is a software application supplied by Macromedia. ...
ColdFusion Components (Objects) ColdFusion was originally not an object-oriented programming language, and even today lacks some OO features, such as multiple inheritance. With the MX release (6+), ColdFusion introduced the component language construct which resembles classes in OO languages. Each component may contain any number of properties and methods. One component may also extend another (Inheritance). Components only support single inheritance. ColdFusion does not currently support Java-style interfaces, although there are plans to introduce this feature in version 8. ColdFusion components use the file extension cfc to differentiate them from ColdFusion templates (.cfm). An object-oriented programming language (also called an OO language) is one that allows or encourages, to some degree, object-oriented programming techniques such as encapsulation, inheritance, interfaces, and polymorphism. ...
In object-oriented programming, inheritance is a way to form new classes (instances of which are called objects) using classes that have already been defined. ...
Constructions and Initialization ColdFusion does not support contructors in the same way as other most other programming languages. Objects are created using tags or the CreateObject function. Some initialisation can be achieved by placing ColdFusion code outside any methods within the component; this code will run once upon object creation. However, this code does not have access to constructor arguments, since there is no mechanism to pass arguments to ColdFusion language features which create objects. To simulate constructors, ColdFusion developers generally code a separate function responsbilble for object initialisation, and which returns an instance of the current object. This is traditionally named init, following ColdFusion's convention of calling contructors of Java objects. Example component with initialization method: <cfcomponent> <cffunction name="init" access="public" returntype="MyObject"> <cfset this.something='do some object initialization'> <cfreturn THIS > </cffunction> Calling an initialization method during construction, possible because the last line in the init function returns a reference to the object. <cfset object=createObject('component','my.object').init()> Since this constructor does not take any arguments, the equivalent is to place this code outside any method: <cfcomponent> <cfset this.something='do some object initialization'> </cfcomponent> The object can now be created without calling the initmethod.
Remoting Component methods may be made available as web services with no additional coding and configuration. All that is required is for a method's access to be declared 'remote'. ColdFusion automatically generates a WSDL at the URL for the component thusly: http://path/to/components/Component.cfc?wsdl. Aside from SOAP, the services are offered in Flash Remoting binary format. The Web Services Description Language (WSDL) is an XML format published for describing Web services. ...
Methods which are declared remote may also be invoked via a HTTP GET or POST request. Consider the GET request as shown.
http://path/to/components/Component.cfc?method=search&query=your+query&mode=strict This will invoke the component's search function, passing "your query" and "strict" as arguments. This type of invocation is well-suited for AJAX-enabled applications. // Ajax can refer to: Ajax (mythology), also known as Telamonian Ajax or Ajax the Great, a Greek hero and legendary king of Salamis who plays an important role in Homers Iliad Ajax the Lesser, or Oilean Ajax, a Greek hero and legendary king of Locris who appears in Homer...
The ColdFusion server will automatically generate documentation for a component if you navigate to its URL and insert the appropriate code within the component's declarations. This is an application of component introspection, available to developers of ColdFusion components. Access to a component's documentation requires a password. A developer can view the documentation for all components known to the ColdFusion server by navigating to the ColdFusion URL. This interface resembles the Javadoc HTML documentation for Java classes. Javadoc is a computer software tool from Sun Microsystems for generating API documentation into HTML format from Java source code. ...
ColdFusion and Java The standard ColdFusion installation allows the deployment of ColdFusion as a WAR or EAR file for deployment to standalone application servers, such as Macromedia JRun, and IBM WebSphere. ColdFusion can also be deployed to servlet containers such as Apache Tomcat and Mortbay Jetty, but because these platforms do not officially support ColdFusion, they leave many of its features inaccessible. JRun is an Macromedias J2EE application server. ...
WebSphere refers to a brand of proprietary IBM software products, although the term also popularly refers to one specific product: WebSphere Application Server (WAS). ...
Apache Tomcat is a web container developed at the Apache Software Foundation (ASF). ...
Because ColdFusion is a Java EE application, ColdFusion code can be mixed with Java classes to create a variety of applications and utilize existing Java libraries. ColdFusion has access to all underlying Java classes, supports JSP custom tag libraries, and can access JSP functions after retrieving the JSP page context (GetPageContext()). Prior to ColdFusion 7.0.1, ColdFusion components could only be used by Java or .NET by declaring them as web services. However, beginning in ColdFusion MX 7.0.1, ColdFusion components can now be utilized directly within Java classes using the CFCProxy class. Recently, there has been much interest in Java development using scripting languages such as Groovy and JRuby. It should be noted that ColdFusion was one of the first scripting platforms to allow this style of Java development. There are, however, some limitations to ColdFusion's ability to offer Java scripting: Look up groovy in Wiktionary, the free dictionary. ...
JRuby is a Java implementation of the Ruby interpreter, being developed by the JRuby team. ...
- lack of Bean Scripting Framework plugin support
- one cannot extend Java classes in ColdFusion
- ColdFusion MX 6.1 did not support usage of null value method parameters
- ColdFusion components cannot be consumed in Java as regular classes (see the paragraph on CFCProxy above)
The Bean Scripting Framework is a method of allowing the use of scripting in Java code. ...
Custom tags ColdFusion provides several ways to implement custom tags, i.e. those not included in the core ColdFusion language. The traditional and most common way is using CFML. A standard CFML page can be interpreted as a tag, with the tag name corresponding to the file name prefixed with "cf_". For example, the file IMAP.cfm can be used as the tag "cf_imap". Attributes used within the tag are available in the ATTRIBUTES scope of the tag implementation page. CFML pages are accessible in the same directory as the calling page, via a special directory in the ColdFusion web application, or via a CFIMPORT tag in the calling page. The latter method does not necessarily require the "cf_" prefix for the tag name. A second way is the development of CFX tags using Java or C++. CFX tags are prefixed with "cfx_", for example "cfx_imap". Tags are added to the ColdFusion runtime environment using the ColdFusion administrator, where JAR or DLL files are registered as custom tags. Third-Party ColdFusion custom tags can be found on ColdFusion Resource Sites such as CFTagStore Finally, ColdFusion supports JSP tag libraries from the JSP 2.0 language specification. JSP tags are included in CFML pages using the CFIMPORT tag.
Query of queries ColdFusion uniquely supports query of queries, alternatively known as queries in memory. Given a variable of QUERY data type, ColdFusion can sort and retrieve selected rows from the result set using standard SQL. Note than in ColdFusion, a query datatype can be generated by methods other than standard database queries. For example, ColdFusion returns a query from a request to list the contents of a directory. For example: <cfdirectory action="list" directory="/path/to/directory/" name="dirListing" /> <!--- Get all XML files ---> <cfquery name="xmlFiles" dbtype="query"> SELECT * FROM dirListing WHERE name LIKE '%.xml' </cfquery> <!--- Get all image files ---> <cfquery name="imageFiles" dbtype="query"> SELECT * FROM dirListing WHERE (name LIKE '%.jpg' OR name LIKE '%.gif' OR name LIKE '%.png') </cfquery> Queries in memory often result in a performance improvement as the ColdFusion server does not have to query the database server multiple times. In the above example, only a single query of the file system was needed, saving processing overhead. However, there is a point in the number of queries or their complexity that an alternative solution is necessary. (see blog entry by Ben Forta - ColdFusion Is Not A DBMS!) Ben Forta is an author and Senior Technical Evangelist for Adobe Systems focussed primarily on ColdFusion. ...
Alternative server environments ColdFusion originated as proprietary technology based on Web technology industry standards. However, it is becoming a less closed technology through the availability of competing products. Products include Railo, BlueDragon, IgniteFusion, SmithProject and Coral Web Builder. This article needs to be wikified. ...
BlueDragon is an alternative CFML engine comparable to Macromedias ColdFusion. ...
IgniteFusion is a freeware CFML script engine that runs cfm script files. ...
SmithProject is a freeware CFML script engine that runs cfm script files. ...
Coral Web Builder is a commercial CFML-compatible scripting engine, targeted at non-technical users and for standalone applications. ...
The argument can be made that ColdFusion is even less platform-bound than raw J2EE or .NET, simply because ColdFusion will run on top of a .NET app server (New Atlanta), or on top of any servlet container or J2EE application server (JRun, WebSphere, JBoss, Geronimo, Tomcat, Resin, Jetty, etc.). In theory, a ColdFusion application could be moved unchanged from a J2EE app server to a .NET app server. JRun is an Macromedias J2EE application server. ...
JBoss (pronounced Jay Boss) is an open source Java EE-based application server implemented in Java. ...
The Geronimo project is an open source application server developed by the Apache Software Foundation and distributed under the Apache license. ...
Apache Tomcat is a web container developed at the Apache Software Foundation (ASF). ...
Resin of a pine Insect trapped in resin. ...
Alternate meanings: See Jetty (web server) Alternate meanings: See Jettying in buildings The term jetty, derived from the French jetie, and therefor signifying something thrown out, is applied to a variety of structures employed in river, dock and maritime works which are generally carried out in pairs from river banks...
Currently, alternative server platforms generally support ColdFusion MX 6.1 functionality, with minor changes or feature enhancements.
Acronyms The acronym for the ColdFusion Markup Language is CFML. When ColdFusion templates are saved to disk, they are traditionally given the extension .cfm or .cfml. The .cfc extension is used for ColdFusion Components. The original extension was DBM or DBML, which stood for Database Markup Language. When talking about ColdFusion, most users use the acronym CF and this is used for numerous ColdFusion resources such as user groups (CFUGs) and sites. It has been suggested that this article or section be merged with Backronym and Apronym (Discuss) Acronyms and initialisms are abbreviations, such as NATO, laser, and ABC, written as the initial letter or letters of words, and pronounced on the basis of this abbreviated written form. ...
// Cf or CF may stand for: cf. ...
CFMX is the common abbreviation for ColdFusion versions 6 and 7 (aka ColdFusion MX).
Code example Query your database: <cfquery name="nameofquery" datasource="odbc_connection"> SELECT * FROM table WHERE field = 'foo' </cfquery> Loop through your records: <cfoutput query="nameofquery"> #nameofquery.field_from_query# <!---Above is a variable reference. This text is a comment ---> </cfoutput> Set and display a variable: <cfset variables.sMyVar = "A Variable defined in CFML"> Here is the contents of the variable: <cfoutput>#variables.sMyVar#</cfoutput> Define and use a function: <cffunction name="AddTwoNumbers" returntype="numeric" output="false" hint="I add two numbers."> <cfargument name="NumberOne" type="numeric" required="true" hint="I am the first number."> <cfargument name="NumberTwo" type="numeric" required="true" hint="I am the second number."> <cfreturn arguments.NumberOne + arguments.NumberTwo> </cffunction> <cfoutput>#AddTwoNumbers(2, 2)#</cfoutput> Define a component (class): <cfcomponent name="thisComponent" extends="anotherComponent"> <cfproperty name="variables.property" type="string"> <cffunction name="init" returntype="thisComponent"> <cfreturn THIS> </cffunction> <cffunction name="getSomeProperty" access="public" returntype="string"> <cfreturn variables.property> </cffunction> <cffunction name="setProperty" access="public" returntype="void"> <cfargument name="property" type="string" required="true"> <cfset variables.property = arguments.property> </cffunction> </cfcomponent> Instantiate a Java class: <cfset variables.myPath = "C:MyFile.txt"> <cfset variables.myFile = CreateObject("java","java.io.File").init(variables.myPath)> <cfset variables.fis = CreateObject("java","java.io.FileInputStream").init(variables.myFile)> Dump the results of a query (for debugging): <cfquery datasource="#dsn#" name="myQuery"> SELECT * FROM myTable </cfquery> <cfdump var="#myQuery#"> Consume a web service: <cfset variables.ws = CreateObject("webservice", "http://web.service/service?wsdl")> <cfset variables.result = variables.ws.fun()> or <cfinvoke webservice="http://web.service/service?wsdl" method="fun" returnVariable="variables.result"> Syntax CFML provides two different syntax formats, each with their own pros and cons.
Tag-based syntax CFML follows an XML/HTML-like syntax in that all commands are written in the format: <cfcommand argument="something">Some text</cfcommand> <cfset variable = "some data"> Note that ColdFusion is not strictly XML because not all attributes have name value pairs and tags need not be well-formed. CFML more closely resembles HTML 4.0 syntax than XML. Since ColdFusion 6.0, the CFML syntax can almost entirely be expressed using XML format, with the key exception of CFIF/CFELSEIF/CFELSE tags.
CFSCRIPT syntax An additional syntax format is available that is similar to Javascript: JavaScript is the name of Netscape Communications Corporations and now the Mozilla Foundations implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. ...
<cfscript> command('argument 1', 'argument 2'); </cfscript> This second format provides a cleaner migration path for people with experience in C-style languages: C, C++, Java, Javascript, etc. One thing to remember is that to use this syntax you must include the cfscript command around the code block -- you can't just launch into cfscript. Almost everything that can be done in tags can be done using CFSCRIPT. Some exceptions are: C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ...
C++ (pronounced see plus plus, IPA: ) is a general-purpose, high-level programming language with low-level facilities. ...
Java is an object-oriented programming language developed by Sun Microsystems in the early 1990s. ...
JavaScript is the name of Netscape Communications Corporations and now the Mozilla Foundations implementation of the ECMAScript standard, a scripting language based on the concept of prototype-based programming. ...
- SQL queries, which require the CFQUERY tag. Note that in ColdFusion, QUERY is a type which can be created in CFSCRIPT.
- Throwing and rethrowing exceptions. (Since ColdFusion MX 6.0, try {} and catch() {} are available to cfscript.)
- Most protocol-based client functionality, such as FTP, HTTP, POP, and LDAP. These are exposed via tags.
Since the introduction of UDFs (User Defined Functions), however, it is possible to define a UDF using tag-based syntax that can be called from within cfscript blocks: SQL (commonly expanded to Structured Query Language â see History for the terms derivation) is the most popular computer language used to create, retrieve, update and delete (see also: CRUD) data from relational database management systems. ...
In computer science, a datatype or data type (often simply a type) is a name or label for a set of values and some operations which one can perform on that set of values. ...
FTP or File Transfer Protocol is used to transfer data from one computer to another over the Internet, or through a network. ...
Hypertext Transfer Protocol (HTTP) is a method used to transfer or convey information on the World Wide Web. ...
In computing, local e-mail clients use the Post Office Protocol version 3 (POP3), an application-layer Internet standard protocol, to retrieve e-mail from a remote server over a TCP/IP connection. ...
In computer networking, the Lightweight Directory Access Protocol, or LDAP (IPA: ), is a networking protocol for querying and modifying directory services running over TCP/IP. A directory is a set of information with similar attributes organized in a logical and hierarchical manner. ...
<cffunction name="readUserData" access="public" returntype="numeric" output="false"> <cfargument name="userId" type="numeric" required="true"> <cfargument name="dsn" type="string" required="true"> <cfset var userData = ""> <cfset var rslt = ""> <cfquery name="userData" datasource="#arguments.dsn#" result="rslt"> select * from tblUser where userId = <cfqueryparam value="#arguments.userId#" cfsqltype="cf_sql_integer"> </cfquery> <cfreturn userData> </cffunction> <cfscript> userData = readUserData(110, "myDataSource"); </cfscript> This allows the passing of arguments to tag-based constructs within cffunction blocks. Also, since ColdFusion MX 6.0 extended createObject() to include CFCs, it is possible to use both custom CFCs and Java objects in CFSCRIPT. Using Java objects to obtain access to protocol-based client functionality often defeats the whole purpose of using ColdFusion. Obviously, using CFCs or cffunction-based UDFs to provide script-style code access to the tag-based language features of ColdFusion is the preferred method. Generally, CFSCRIPT is used to perform simple statements–such as multiple assignments–in lieu of multiple CFSET tags. CFSCRIPT can also be used to define UDFs: <cfscript> function addTwoNumbers(a,b) { return a+b; } </cfscript> In this case, however, it is impossible to define the content type detection that ColdFusion provides for arguments (string, numeric, query, struct, array, etc.), access restrictions on the UDF (public, private, package, remote), whether or not the UDF is allowed to generate output, or the return value content type (as with arguments). Using CFSCRIPT to define UDFs is handy for smaller tasks or simple things that aren't reliant on the various attributes that the CFFUNCTION and CFARGUMENT tags provide.
Criticism Choices of scripting languages for any task are subject to much debate in the IT community. Criticisms of ColdFusion include: Information technology (IT), as defined by the Information Technology Association of America (ITAA)is: the study, design, development, implementation, support or management of computer-based information systems, particularly software applications and computer hardware. ...
- ColdFusion is expensive, especially compared to its competitors, which are almost always free. Even Microsoft-based scripting solutions such as ASP.NET are technically free if you own a PC or server running some version of Windows. The rapid deployment of ColdFusion applications negates the cost of the server, since most applications can be built at manpower savings that significantly make up for the cost of the server. However, there are several free versions of ColdFusion, although they do not have 100% of the features.
- Many scripting languages such as PHP, Ruby, Perl and Python are open-source. While the language of CFML itself is well-documented, ColdFusion's server code is not readily viewable or modifiable. Applications built using ColdFusion are viewable and modifiable unless they were deployed as a binary CAR file (similar to a JAR file).
- CFML syntax is much different from traditional programming languages, which use a C-style syntax. Although CFScript offers this alternative, ColdFusion code is often written in CFML.
- Although CFML is certainly not alone in using tag-based syntax (ASP.NET and JSP also uses them to render some UI elements), it is the only language that wraps core application logic in a tag-based syntax.
- ColdFusion libraries and extensions are few, and rarely free, although there are sites dedicated to open-source ColdFusion code and many open-source frameworks have emerged (see below).
- ColdFusion lacks features present in other scripting languages. A significant omission from ColdFusion's tag library, for example, is the ability to manipulate common image formats. Another of note is a client IMAP tag. Missing features are often available as extensions, with the caveat on extensions as above, and image manipulation is planned for CFMX 8.
- ColdFusion lacks advanced object-oriented features such as providing little distinction between instance and class (virtual and static) properties and methods. ColdFusion doesn't offer constructor syntax per se, but rather forces an object factory pattern to return object instances. A common idiom is to use init to indicate a method which is the constructor for each component. Methods are implicitly virtual if they reference the THIS scope. There are several techniques available to provide mixin functionality.
- CFScript is similar to but incompatible with the ECMAScript specification. ColdFusion does include some server-side Actionscript functionality (which is ECMA-script compliant), however server-side Actionscript has significantly fewer features than CFML.
- Certain features of ColdFusion such as event gateways, creation of datasources, caching settings and classpath additions are not readily configurable for usage in a shared hosting environment.
- ColdFusion components are not serializable.
Microsoft Windows is the name of several families of proprietary software operating systems by Microsoft. ...
ECMAScript is a scripting programming language, standardized by Ecma International in the ECMA-262 specification. ...
ActionScript is a scripting language based on ECMAScript, primarily used to develop software for the Adobe Flash . ...
Development aids The following tools and frameworks are available:
Development tools / Environments An integrated development environment (IDE), also known as integrated design environment and integrated debugging environment, is a type of computer software that assists computer programmers in developing software. ...
Macromedia was an American graphics and web development software house headquartered in San Francisco, California. ...
HomeSite is an HTML editor owned by Adobe Systems (formerly owned by Macromedia). ...
Macromedia was an American graphics and web development software house headquartered in San Francisco, California. ...
Macromedia Dreamweaver is a web development tool, created by Macromedia (now Adobe Systems), which is currently in version 8. ...
WYSIWYG (IPA Pronunciation [] or []), is an acronym for What You See Is What You Get, used in computing to describe a system in which content during editing appears very similar to the final product. ...
CFEclipse is a CFML plugin for the Eclipse platform. ...
Eclipse is an open source platform-independent software framework for delivering what the project calls rich-client applications, as opposed to thin client browser-based applications. ...
Eclipse is an open source platform-independent software framework for delivering what the project calls rich-client applications, as opposed to thin client browser-based applications. ...
TextMate is a text editor for Mac OS X. It is primarily designed for programmers and web designers. ...
ColdFusion Frameworks - Model-Glue (Model-Glue), an event-based implicit invocation MVC framework.
- Fusebox (FuseBox), The most popular framework for coldfusion (also available for PHP).
- ColdSpring Framework (ColdSpring Framework), an IoC framework that provides functionality similar to Java Spring for ColdFusion.
- Mach-II (Mach-II), Mach-II is a popular implicit invocation architecture framework.
- Tartan Framework (Tartan), Tartan is a command-driven service framework for ColdFusion.
- Transfer ORM (Transfer ORM), an ORM (object relational mapper) framework for coldfusion that focuses on Business Objects.
- Reactor ORM (Reactor ORM), an ORM (object relational mapper) framework for coldfusion that focuses on Active Record Style development.
Model-Glue is a pure OO framework based on the MVC design pattern. ...
Fusebox is a popular web development framework for ColdFusion and other web development languages. ...
ColdSpring is a framework for ColdFusion. ...
Mach-II is a framework for developing object oriented Model-View-Controller web-applications. ...
Monitoring & testing tools - SeeFusion - Web based monitoring tool written in Java and implemented as a servlet filter in the JVM to monitor page requests. Also includes wrapper for database drivers to monitor/control database calls. Metrics can be logged to a database for review, or aggregated trending reports. SeeFusion provides an API (XML via HTTP request) to programmatically access its data. The newest version (SeeFusion 4) uses Flex 2, a Flash-based interface which is also a product of Adobe.
- FusionReactor - Web based proactive server monitoring tool available for ColdFusion as well as other J2EE containers (such as Tomcat or JBOSS). Monitoring features similar to SeeFusion with additional features of crash protection and automatic “self healing” corrective actions, which are based on user defined server survival strategies.
- The next version of ColdFusion (Scorpio) will include some built-in monitoring similiar to portions of SeeFusion and FusionReactor's functionality. Scorpio will also include an API (CFC's) for programmatically accessing the data.
- CFUnit - a unit testing framework for CFML, modelled after the popular JUnit framework.
- cfcUnit - a unit testing framework for CFML, part of the xUnit family and modelled on the API of the JUnit framework.
CFUnit is a unit testing framework for ColdFusion (CFML), modeled after the popular JUnit framework. ...
In computer programming, a unit test is a procedure used to validate that a particular module of source code is working properly. ...
CFML may mean: ColdFusion Markup Language, a scripting language for ColdFusion, CFML, a radio station in Vancouver, British Columbia. ...
JUnit is a unit testing framework for the Java programming language. ...
cfcUnit is a unit testing framework for ColdFusion (CFML), part of the xUnit family, and modelled on the API of the JUnit framework. ...
Various code-driven testing frameworks have come to be known collectively as xUnit. ...
Training and certification ColdFusion-focused podcasts This article needs cleanup. ...
Jeff Peters is a consultant, author and speaker whose work is widely known in the Fusebox community. ...
ColdFusion-focused blog syndications Technical mailing lists - CF-Talk at House of Fusion - A high-volume list that tends to be on or around the topic of ColdFusion and web development. For CFML developers of all skill levels. There is also a jobs list available, and an off-topic community list.
- CFCDev at CFCZone - A medium-volume list largely discussing object-oriented development practices and frameworks. For advanced CFML developers and those applying OOP principles in ColdFusion. * Coldfusion howto Yahoo Coldfusion list.
- cfFrameworks Coldfusion frameworks list.
See also - ColdFusion Markup Language
- BlueDragon - Alternative to ColdFusion for running CFML
- Railo - High performance alternative for running CFML
- Smith Project - A freeware, cross-platform CFML engine, written in Java that might be open-sourced in the future.
- Ignite Fusion - Another free CFML alternative
CFML is the name of the scripting language used by ColdFusion, Blue Dragon, and other web development platforms. ...
BlueDragon is an alternative CFML engine comparable to Macromedias ColdFusion. ...
This article needs to be wikified. ...
Programming languages are used for controlling the behavior of a machine (often a computer). ...
External links |