Flash Remoting.com
Home Book Examples Blog Resources About
Search

You are using an out-of-date browser so the pages will not display properly. Please update your browser.

Random thoughts on Flash Remoting:

This is where I get to ramble when I feel like it. Kind of like a blog, but it's not a blog. This is a blog. ;-).

6 posts in June 2004.

[ALL] 1/06 | 9/05 | 8/05 | 7/05 | 10/04 | 8/04 | 7/04 | 6/04 | 4/04 | 3/04 | 2/04 | 1/04 | 12/03 | 11/03 | 10/03 | 9/03 | 8/03 | 7/03 | 6/03 | 5/03 | 4/03 | 3/03 | 1/03 | 12/02 | 11/02

1-5 | 6-6

CFUN presentation and examples posted

Tuesday, June 29, 2004 3:45:45 PM

I've posted my Flash Remoting presentation for CFUN attendees, including 3 basic Flash samples that I used during the presentation at http://www.tom-muck.com/sessions/. Also, the trace dumps are located at http://www.tom-muck.com/sessions/cfun2004/tcptrace.cfm. People are usually surprised when they see the packet sizes of Flash Remoting vs. a comparible web service call. In this case, the Flash Remoting response was about 700 bytes vs. 7000 bytes for the web service.

The session could have gone better, as the examples I went over and over that worked flawlessly before the session decided not to work when in front of a live audience, but that usually happens. All in all, I hope everyone who attended got the main point of the session: Flash Remoting is cool. Also, as a CF programmer, you would never use a web service with Flash -- you would use Flash Remoting. The other main focus of the presentation was to show how the Flash Remoting AS 2 components differ from the AS 1 components. In short, there are 6 simple steps to follow to use the AS 2 components:

  1. Drag the components out of the library from Window > Other Panels > Common Libraries > Remoting
  2. Import the required classes
  3. Create a new Service object to reference your connection and remote service
  4. Create a new PendingCall object to handle responses from that remote service
  5. Create a new RelayResponder to set up your result and fault (error) functions
  6. Create the result and fault functions to handle all outcomes from your remote service call.

A simple code snip from a HelloWorld application using new syntax:

// ActionScript reference to a remote service
import mx.remoting.Service;
// All remote function calls return a PendingCall
import mx.remoting.PendingCall;
// Relays the remote or response to the correct function
import mx.rpc.RelayResponder;
// In the event of a successful function call, use a ResultEvent
import mx.rpc.ResultEvent;
// In the event of an error, use a FaultEvent
import mx.rpc.FaultEvent;

// If using the NetConnection debugger, use this class (only during testing)
import mx.remoting.debug.NetDebug;

// Start the debugger
NetDebug.initialize();

// Set up variables for the URL and service paths
var myURL:String = "http://localhost/flashservices/gateway";

var myServicePath:String = "cf.com.flash_remoting.frdg.HelloUser";
// webpath is <webroot>/cf/com/flash_remoting/frdg/HelloUser.cfc

// service path could also use the web service:
// http://localhost/cf/com/flash_remoting/frdg/HelloUser.cfc?wsdl

// Create connection reference to service and create service object
var myService:Service = new Service(myURL, null, myServicePath);

// call the service sayHello() method
var pc:PendingCall = myService.sayHello('Tom');

// tell the service what methods handle result and fault conditions
pc.responder = new RelayResponder(this, "sayHello_Result","sayHello_Fault");

function sayHello_Result(myResult:ResultEvent){
  // display successful result
  theMessage.text = myResult.result;
}

function sayHello_Fault(myFault:FaultEvent){
  //display fault returned from service
  theMessage.text = myFault.fault.faultstring;
}

 

 

Add comment (10)
View comments

Flash Remoting Components video tutorials

Monday, June 28, 2004 10:13:39 AM

Paul Newman at Community MX has released an article/video tutorial that deals with the new Flash Remoting components. The 3 videos are approximately 10 minutes each and show in detail how to use the new components using both code and using the new Remoting Connector component. Community MX is a commercial site, but for getting up to speed quickly on the new components I recommend this particular article highly.

http://www.communitymx.com/abstract.cfm?cid=DF20A

Add comment (2)
View comments

CFUN going on now

Saturday, June 26, 2004 9:38:50 PM

Today was the first day of the CFUN conference in Rockville, MD (local conference for me.) I did a session on the new Flash Remoting components. I'll have session details for conference attendees posted here soon, including the code for the demos and working online versions. CFUN is always a good show for CF programmers, because they get the top names in the ColdFusion community to participate. This year, they have something like 550 attendees.

Add comment (0)
View comments

Online trading application uses Flash Remoting

Wednesday, June 16, 2004 4:35:08 PM

Flash Remoting is in the news again at Yahoo Finance. A company called Wall Street Access is using the Flash Remoting technology for it's online trading application. More information can be found at http://www.wallstaccess.com, with a demo of the product at http://www.wsaccess.com/aa/.

Add comment (1)
View comments

New article about using Flash Remoting Components 2.0

Thursday, June 10, 2004 6:35:33 PM

Mike Kollen and Nahuel Foronda have written an outstanding article on Devnet (http://www.macromedia.com/devnet/mx/trio/articles/trio_widget2004.html about using the new Flash Remoting 2.0 components in Flash MX 2004. They used the Trio Motors sample application to build the app. The article shows some best practices for building a Flash Remoting application using the new components using a MVC approach (model-view-controller).

Add comment (0)
View comments

1-5 | 6-6