FLASH and RPC using AMFphp - PowerPoint PPT Presentation

About This Presentation
Title:

FLASH and RPC using AMFphp

Description:

Communication between client and server by setting a callback and receiving a result. ... http://www.sephiroth.it/ http://www.flash-db.com ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 10
Provided by: csU50
Learn more at: https://www.cs.unca.edu
Category:
Tags: flash | rpc | amfphp | sephiroth | using

less

Transcript and Presenter's Notes

Title: FLASH and RPC using AMFphp


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
  • 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 servicevar serviceService new
    Service('http//localhost/amfphp/gateway.php',
    null, 'com.company.MyService')
  • Create the remote methodvar pcPendingCall
    service.myMethod("arg1", x'myX')
  • pc.responderRelayResponder new
    RelayResponder(this, "onSuccess", "onFault")
  • Handle the resultfunction onSuccess(reResultEven
    t)
  • trace("Success!")
  • function onFault()
  • trace("Fudge! (")

5
Getting Started php...
  • lt?php
  • class HelloWorld
  • function HelloWorld()
  • this-gtmethodTable array
  • (
  • "say" gt array
  • (
  • "access" gt "remote",
  • "description" gt "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/
  • http//www.flash-db.com/
  • http//www.macromedia.com/devnet/mx/flashremoting/
Write a Comment
User Comments (0)
About PowerShow.com