So, buried in the documentation around ColdFusion Builder is the fact that you can write extensions in Flex. I decided to fool around with this for a bit.
If you want to skip all of the demo and explanation and just try it out, feel free to pull down the extension:
Builder Stats – ColdFusion Extension with Flex from Terry Ryan on Vimeo.
So doing it is pretty easy on the Builder side:
- Create a remote service CFC for all of the information that you want to expose to Flex
-
Have your ColdFusion Builder extension pass information to the Flex generated SWF
- Pass any variables to the SWF just like you would pass URL variables
On the Flex side:
- Pull in the remote service cfc as a WSDL* using Flash Builder’s Data/Services
- Write your Flex app to use the services that get created
- Alter the generated ActionScript classes to use a WSDL that is passed into the SWF via the URL (Flash Params)
One more thing:
I’m not sure if this is a Flex thing, a ColdFusion thing, an OS thing, a webservices thing, or a me being dumb thing, but the automatically generated WSDL for my remote service CFC was different on Windows and Mac. Consequently the SWF could call the Mac hosted WSDL but not the Windows hosts WSDL. My solution? Create a static WSDL file that had the service spelled both ways. Maybe a hack but worked like charm.
Anyway, if you want to see the code, it’s available on github:
*WSDL? Why not Flash Remoting (or ColdFusion in the Data/Services list)? Remoting needs to be configured to each system’s configuration, and isn’t very discoverable. WSDL doesn’t require knowing about the Extension user’s AMF setup; it just uses a URL, which can be easily discovered.
Looking very slick. The whole extension situation is one of the most exciting things about Builder. Finally, there’s a really solid, intuitive way for regular developers to extend the IDE platform; plugins like this really just demonstrate that very well.
LikeLike