Coldfusion Centaur and service access from Actionscript

And this is why I like Coldfusion so much. I have been a huge fan of Coldfusion for many years. The tagging structure and relatively few lines of code required to do some rather complex things are a huge win for me. Integrating Coldfusion to Flash and Flex has always been relatively painless, especially with remoting, however the guys at Adobe are about to blow the roof off with how simple server integration from Flex can be.

 <cf:Mail id="cfMail"
to="{to.text}"
from="{from.text}"
subject="{subject.text}"
content="{body.text}"
type="html" />

That's a sample in MXML, not Coldfusion, holy flying centaur's batman!

Here's a quote from Ben Forta's site.

And while we're at it, what about the Flex developer who needs to generate an e-mail message? Flex (well, Flash) has no built in SMTP libraries, and so Flex developers who need to programmatically generate e-mail messages do so by writing code on the server. For ColdFusion developers this means creating a ColdFusion Component which accepts data from a Flex application (likely via an AMF call) and then passes that same data to a tag. In other words, code is being written on the server just to be able to pass data from Flex on the client to the tag. So why couldn't a Flex developer just invoke directly, passing it name=value pairs so it can generate an e-mail?

Well, with the upcoming ColdFusion Centaur, the answer to all of these questions is yes, these are all doable! In ColdFusion Centaur we're exposing lots of those integrated ColdFusion services via AMF (Flash Remoting) and SOAP (Web Services).

You can read the full post here. There is also a great vid with Ryan Stewart on Adobe TV showing how to use the Coldfusion tags Ben mentions, talk about sweeeet.


I can not wait to get my hands on Coldfusion 9 and the full list of exposed services.

2 Comments:

  1. Dan

    Is it that hard to make a call from flex to coldfusion to fire off an email presently? I don't think so. And these services are pretty much useless outside of a intranet.

  2. Derrick

    Hey Dan,
    I wouldn't say hard, just redundant. To send an email you need to create a cfc with a method to accept all the required mail options. Why not just call the cfmail directly. Not sure why you'd say they are useless outside of an intranet. Secure them using unap just like a normal cfc.
    Derrick


Leave a comment

Name: (required)

Email: (required)

URL:

Captcha test: (required)
Comments: (required)

wrap code blocks in <code> </code> tags