Zendcon 09

  • 5,642 views
Uploaded on

Slides from my zendcon presentation in 2009

Slides from my zendcon presentation in 2009

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,642
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
0
Comments
0
Likes
10

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Advanced Data Communication with the Flash Platform twitter.com/wadearnold wadearnold.com wade.arnold@t8design.com
  • 2. resources Zend AMF Downloads http://framework.zend.com/download/amf Adobe Flash Builder 4 beta 2 http://labs.adobe.com/technologies/flashbuilder4/ New PHP Features in Flash Builder 4 - Part 1: Data-Centric Feature Overview http://ria.dzone.com/articles/new-php-features-flash-builder New PHP Features in Flash Builder 4 - Part 2: Using Zend AMF and Flash Remoting http://ria.dzone.com/articles/new-php-features-flash-builder-2 Session Files http://wadearnold.com/blog/
  • 3. Why AMF? • Binary + referencing = fast wire speed • One CPU cycle and it can be rendered • No parsing time on the cpu • No parsing logic w/ the developer • Alternative endpoint in your SOA architecture
  • 4. http://jamesward.com/census
  • 5. One year..... • Zend Amf was released into ZF incubator at ZendCon ‘08 • 96 bugs fixed • 6 Features added • 44 outstanding features / bugs • 89% of code coverage • 7 SVN committers
  • 6. DB Resource Plugin • Mysqli Result • Mysql Result public function getArrayCollection() { $this -> connect(); $sql = "SELECT * FROM census " . "LIMIT 100"; $result = mysql_query( $sql ) or die( "Query failed: " . mysql_error() ); return $result; }
  • 7. Authentication public function ServiceDelegateAmf(responder:IResponder):void { this.responder = responder; this.service = ServiceLocator.getInstance().getRemoteObject("zendamf"); this.service.setCredentials("wade", "arnold"); }
  • 8. Create Auth Adapter class RemoteUser extends Zend_Amf_Auth_Abstract { public function __construct($name, $role) { $this->_name = $name; $this->_role = $role; } public function authenticate() { $id = new stdClass(); $id->role = $this->_role; $id->name = $this->_name; return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, $id); } }
  • 9. bootstrap $this->_server = new Zend_Amf_Server(); $this->_acl = new Zend_Acl(); $this->_server->setAuth(new RemoteUser("wade", "testrole")); $this->_acl->addRole(new Zend_Acl_Role("testrole")); $this->_acl->allow("testrole", null, null); $this->_server->setAcl($this->_acl);
  • 10. Basic Service class demo { function hello() { return "hello!"; } function hello2() { return "hello2!"; } function initAcl(Zend_Acl $acl) { $acl->allow("testrole", null, "hello"); $acl->allow("testrole2", null, "hello2"); return true; } }
  • 11. More Auth & ACL! • Open ID • Ldap • Database • Conditional rules
  • 12. Model package com.t8.census.vo <?php { class Person [Bindable] { [RemoteClass(alias="Person")] public $id = 0; public class PersonVO public $age = ""; { public $classofworker = ""; public var id:int = 0; public $education = ""; public var age:int; public $maritalstatus = ""; public var classofworker:String; public $race = ""; public var education:String; public $sex = ""; public var maritalstatus:String; } public var race:String; public var sex:String; } }
  • 13. What’s Next? • Documentation • Adobe Evangalist, Adobe TV, DZone • HTTP Long Pulling • Speed • cache reflection • AMFEXT • Service Browser
  • 14. Help? Issue tracker Mailing list Documentation
  • 15. Advanced Data Communication with the Flash Platform twitter.com/wadearnold wadearnold.com wade.arnold@t8design.com