Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1260

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
The event gateway mechanism has the following major features:
• ColdFusion event gateways do not require HTTP requests. ColdFusion developers can write ColdFusion gateway
applications without using any CFM pages (just CFCs).
• ColdFusion CFCs can use event gateways to listen for and respond directly to external events.
• Event gateways operate asynchronously. A gateway typically gets a message and dispatches it for processing,
without requiring or waiting for a response.
• ColdFusion developers can create event gateways to handle any type event that a Java application can receive.
ColdFusion includes several product-level event gateways, such as a gateway for the XMPP (Extensible Messaging and
Presence Protocol) instant messaging protocol. Adobe also provides the source for several example gateways, such as
a generalized socket gateway, that you can extend to handle your specific needs. You can also write your own gateways
in Java to handle other event or messaging technologies supported by the Java runtime or by third-party providers,
such as gateways for additional instant messaging protocols, gateways for specific ERP systems, or other protocols,
such as NNTP.
Using event gateways
Because event gateways provide a generalized asynchronous messaging mechanism, you can use them with many
kinds of event or messaging resources. For example, ColdFusion includes gateways (either product quality, or lighter
weight example gateways) for communicating between ColdFusion applications and the following types of resources:
• Mobile phones and other devices that support short messaging services (SMS)
• XMPP or IBM Sametime Instant message clients
• Java Sockets (which let your ColdFusion application communicate with TCP/IP-based devices and programs, such
as Telnet terminal clients).
• Java Messaging Service (JMS) resources, such as storefront sales order handling systems.
Event gateways are not limited to sending or receiving information using communications protocols. For example,
ColdFusion includes an example event gateway that monitors changes to a directory and invokes a CFC method
whenever the directory changes. ColdFusion also includes an event gateway that lets a CFML application "call" a CFC
asynchronously and continue processing without getting a response from the CFC.
Just as you can create event gateways that serve many different event or messaging based technologies, you can write
many kinds of applications that use them. Just a few examples of possible gateway uses include the following.
Server to client push examples
• An application that sends an instant message (IM) or SMS text message to a person who can approve a purchase
order, get a response, and mark the purchase order as approved or denied.
• A bot that notifies users through their preferred messaging method (mobile phone, instant messaging, or even e-
mail) when watch list stock goes up, and offers to buy or sell the stock immediately.
• An application that authenticates web users by sending them an SMS message that includes code that they must to
enter into the browser to proceed.
Client to server examples
• A menu-based SMS application that lets users get information from any of several web service data providers.
ColdFusion includes an SMS menuing example int the gateways/cfc directory.
• An instant messaging application that takes messages from users to technical support and assigns and directs the
messages to the most available support staff member. The application could also log the user ID and session, and
you could use ColdFusion to generate usage reports.
Last updated 1/20/2012
1255

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents