|[Printable Version] [Search: ] [Daryl's TCP/IP Primer] [Daryl's ColdFusion Blog]|
ColdFusion is a programming language. Like Java, in the sense that it is nothing by itself; it requires a programmer with vision and skill to make anything useful out of it. Like Visual Basic, in the sense that the language is tailored for a specific purpose, but general enough to accomplish most any task easily within that scope. (Visual Basic is designed to make applications for the Windows environment; ColdFusion is designed to make applications for the Web server environment.)
ColdFusion was originally designed for allowing database contents to be easily displayed in Web pages for any browser, without plugins, by manipulating the HTML output of a Web browser. Since the browser is fed nothing other than standard HTML, no plugins are needed.
ColdFusion also makes gathering, manipulating, and
presenting data from other data sources easy, including other Web servers, FTP
servers, ASCII data files, POP mail servers--not even COM and CORBA objects are
Most programmers are used to working with procedural or object-oriented (oop) languages like Pascal, C++, and Java. The "run-time" environments for these languages are similar: you start an application, the application runs, and then the user quits the application. A continuous "state" is created at startup, maintained throughout the operation of the program, and destroyed (or saved) at program shutdown.
A ColdFusion template (think "program" or "program module") is processed when a request is made to the Web server. Once the template has completely finished processing, the Web server sends the HTML generated by the template. (Not even one byte of output is sent to the browser until the template has completely finished.) During a template's execution span, it may prepare and send several SQL statements to be processed by ODBC database systems, or prepare and send HTTP requests to other Web servers, or do whatever else is necessary to acquire and format data for the end user.
ColdFusion is designed to be embedded in other languages--most notably HTML. It is designed like HTML; most of its major capabilities are accessed through tags. Just as <TABLE> and </TABLE> mark the beginning and end of an HTML table, <CFQUERY> and </CFQUERY> mark the beginning and end of an SQL query in ColdFusion.
SQL is designed to easily and conversationally retrieve and manipulate data stored in any form of relational database (or manipulate the databases themselves, but I'm not going into that in this Primer.) SQL statements are executed outside of ColdFusion; once the </CFQUERY> tag is reached, the SQL generated within the <CFQUERY> tag is sent to the SQL database engine (Access, Oracle, NonStop SQL, or whatever.) The ColdFusion server waits for all of the results to be returned, then resumes processing of the template.
Someone once asked me which is faster, a ColdFusion database or an Oracle database. The question was nonsensical. (What coffee tastes better: Maxwell House or Mr. Coffee?) I was reminded of the Dilbert comic where Dilbert's boss asked him to build a database. Dilbert was fairly sure his boss didn't understand what he was talking about, so he asked his boss what color he wanted that database. 'I think Mauve has the most RAM...'
At the risk of being redundant, ColdFusion is not a database system. ColdFusion is an applications development language tailored toward presenting data retrieved from SQL data sources in HTML format.
It's also critically important to keep in mind when and where these languages are executing: