Presentation is loading. Please wait.

Presentation is loading. Please wait.

FLASH and RPC using AMFphp

Similar presentations


Presentation on theme: "FLASH and RPC using AMFphp"— Presentation transcript:

1 FLASH and RPC using AMFphp
Andrew Giles

2 What are we talking about here?
A simple integration of actionscript and php. Also integrates Flex, Javascript, Ajax, XML. The in's and out's Uses and Ideas Resources A real-time example

3 RPC? Remote Procedure Call How AMFphp does it...
Communication between client and server by setting a callback and receiving a result. How AMFphp does it... Perform request Deserialize request Finds the corresponding remote class Instantiates the class Performs security checks Calls the remote method using the specified arguments Serializes the returned data

4 Getting Started actionscript...
Include the required classes import mx.remoting.debug.NetDebug; import mx.remoting.*; import mx.rpc.*; NetDebug.initialize(); Create the service var service:Service = new Service(' null, 'com.company.MyService'); Create the remote method var pc:PendingCall = service.myMethod("arg1", {x:'myX'}); pc.responder:RelayResponder = new RelayResponder(this, "onSuccess", "onFault"); Handle the result function onSuccess(re:ResultEvent){ trace("Success!"); } function onFault(){ trace("Fudge! :(");

5 Getting Started php... <?php class HelloWorld {
function HelloWorld() $this->methodTable = array ( "say" => array "access" => "remote", "description" => "Pings back a message" ) ); } function say($sMessage) return 'You said: ' . $sMessage; ?>

6 Datatypes

7 Example Uses and Ideas Data Visualization Online/Intranet CRM
Content Management Systems RFID/Database Integration Web Services RSS Dynamic Gaming Environments Real Estate and MLS websites Website file system automation

8 Advantages? Object Oriented Real-time feedback Consistent layouts and interactivity Cross browser/platform compatibility Stand-alone projector applications

9 Resources http://www.amfphp.org/ http://www.sephiroth.it/


Download ppt "FLASH and RPC using AMFphp"

Similar presentations


Ads by Google