ColdFusion Fundamentals


ColdFusion behaves as an application server, and it functions as described in the previous section. ColdFusion runs on all major operating systems, but regardless of the operating system used, it functions the same way. The core services (or daemons) are always running, and requests are submitted to them for processing as they come in.

NOTE

I stated that ColdFusion behaves as an application, and not that it is an application server. The distinction is subtle, but is one worth noting. Earlier versions of ColdFusion were indeed application servers themselves, but not anymore. As of ColdFusion MX, ColdFusion is a J2EE application that is deployed on top of industry standard J2EE servers. ColdFusion thus behaves like a server (in that it responds to incoming requests and returns results) but is actually an application running on an underlying J2EE server.


How ColdFusion Works

ColdFusion processes requests when instructed to do so by the Web server. ColdFusion processes scripts (usually .cfm files) and generates output, which is then sent to the client.

ColdFusion is completely client agnostic, and thus supports every client technology (including HTML, JavaScript, and VBScript). The ColdFusion instructions within the scripts are processed on the server and are never sent to the client. The generated client code is sent to the client as is.

ColdFusion provides interfaces to all major back-end technologies, including:

  • Databases (via JDBC or other drivers)

  • Email (POP and SMTP)

  • Internet protocols (HTTP, FTP, and LDAP)

  • XML and Web Services

  • Any other technology that can be accessed via Java, C/C++, COM, or CORBA

ColdFusion applications are made up of sets of .cfm files, just like Web sites are made up of sets of HTML files. ColdFusion applications are simply sets of scripts in a directory structure of your choice (usually under the Web root).

NOTE

.cfm files are plain-text files and are usually stored and deployed as such. However, it is possible to compile ColdFusion source into Java bytecode which can be deployed and distributed without the original source code, providing a degree of code protection.


CFML

ColdFusion code is written in CFMLthe ColdFusion Markup Language. This is a tag-based language (much like HTML), and tags are used to perform everything from conditional processing to database integration and more. In addition, ColdFusion developers can extend the CFML language by writing their own tags.

CFML also features a rich set of functions that can be used for all sorts of data manipulation. Unlike tags, which perform specific operations, functions return data (or manipulate data). ColdFusion developers can also create their own functions.



Macromedia ColdFusion MX 7 Certified Developer Study Guide
Macromedia ColdFusion MX 7 Certified Developer Study Guide
ISBN: 0321330110
EAN: 2147483647
Year: 2004
Pages: 389
Authors: Ben Forta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net