Overview


Prior to the release of ColdFusion MX, the discussion of HTTP eventually developed into discussions of intelligent agentsoperations in which you're asking some outside process to perform a calculation and return some data. These operations can include calling a COM object, calling a stored procedure from a database, or using <cfhttp> to call another ColdFusion machine to do work for you. The simple determining factor is that the functionality resided outside of the application and that we needed to send information or make a request to some other machine to access it. The information returned is used for further processing or displayed without modification.

The brokering arrangements between servers were once custom written and specific to the needs of the application. However, both the Internet development environment we live in and ColdFusion MX have grown and made an industry standard of the technology required for communication among servers: It's called Web Services. Although an intelligent agent and a Web service can both accomplish the same functionality, the Web service is the preferred manner due to the supporting services and Web serviceenabled applications currently available. The topic of Web Services will be covered in more detail in Chapter 24, "Creating and Consuming Web Services."

Web Services notwithstanding, it's important to understand what goes into creating an intelligent agent. An example of an intelligent agent would be using <cfhttp> to retrieve a page with stock values on it and then parsing out only the stock values, leaving the rest of the page unused. In this case, to use the stock values you would have to know the exact setup of the page you requested, in order for the parsing algorithm to work. A safer use of an intelligent agent to get stock quotes would be to request the necessary stock quotes in an agreed-upon format, such as XML, so that you could avoid the constantly changing Web-page parsing of the first example. This last option provides some standards-based ways of communicating, but it fails to provide the standard messaging that Web Services dictates.



Advanced Macromedia ColdFusion MX 7 Application Development
Advanced Macromedia ColdFusion MX 7 Application Development
ISBN: 0321292693
EAN: 2147483647
Year: 2006
Pages: 240
Authors: Ben Forta, et al

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