Zend Amf And Flex
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Zend Amf And Flex

on

  • 34,911 views

Introsuction to using Zend AMF with Zend Framework and Adobe Flex

Introsuction to using Zend AMF with Zend Framework and Adobe Flex

Statistics

Views

Total Views
34,911
Views on SlideShare
34,748
Embed Views
163

Actions

Likes
6
Downloads
154
Comments
0

7 Embeds 163

http://www.slideshare.net 140
http://www.howl.or.kr 14
http://admin.howl.or.kr 3
http://www.techgig.com 3
http://translate.googleusercontent.com 1
http://webcache.googleusercontent.com 1
http://10.150.200.57 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Zend Amf And Flex Presentation Transcript

  • 1. Zend AMF and Flex
  • 2. Zend Framework
    • Web site: http://framework.zend.com
    • Zend Framework (ZF) is an open source, object-oriented web application framework implemented in PHP 5 and licensed under the New BSD License.
    •  
    •   ZF was publicly announced at the first Zend Conference in October 2005. On July 1, 2007, Zend Framework 1.0 was released.
    •  
    • Current Version 1.7.7 http://framework.zend.com/download/latest
  • 3. Why are people using Zend?
      • Use-at-will Framework
      • Provides components for MVC, Table Data Gateway and Row Data Gateway design patterns
      • All components in Zend Framework are object oriented
      • Takes advantage of the latest development features
        • AJAX
        • Search Engine
        • Web Services
      • BSD License (Enterprise Friendly)
      • Well Documented
  • 4. Adobe Flex
    • http://www.adobe.com/products/flex/
    •  
    • Flex is an open source framework used to create cross-platform Rich Internet Applications (RIA) 
    •  
    • Adobe Released Flex 1.0 in March of 2004
    •  
    • Current SDK: 3.3
    •  
    • Flex Builder IDE based on Eclipse
  • 5. AMF Action Message Format
    •   Action Message Format is an object exchange binary format accessed through a Remote Procedure Call (RPC)
    •  
    • Adobe Systems published the AMF binary data protocol specification on December 13, 2007 and announced that it will support the developer community to make this protocol available for every major server platform.
  • 6. AMF Benefits
      • AMF Objects are small compressed using zlib
      • Fast serialization / deserialization
      • Native Types and Custom classes supported
  • 7. http://www.jamesward.com/blog/2007/04/30/ajax-and-flex-data-loading-benchmarks/
  • 8. Zend AMF
    •  
    • Info: http://framework.zend.com/manual/en/zend.amf.html 
    •  
    • Download: http://framework.zend.com/download/amf
    • Zend_Amf provides support for Adobe's Action Message Format (AMF), to allow communication between Adobe's Flash Player and PHP. Specifically, it provides a gateway server implementation for handling requests sent from the Flash Player to the server and mapping these requests to object and class methods and arbitrary callbacks.
  • 9. Files: Root
    • app/
    • lib/
    • log/
    • pub/
    • tmp/
  • 10. Files: app/
    • conf/
    •     setupdb.sql
    •     main.ini
    • models/     Contacts.php
  • 11. Files: lib/
    • Zend/
    •     Acl.php
    •     Acl/
    •     .........
    • Riafox/     Flexstring.php
    •     Flexstring/
  • 12. Files: pub/
    • css/
    • img/     
    • js/
    • swf/
    •      main.swf
    • xml/
    •     crossdomain.xml
    •     gateway-config.xml
    •  
    • .htaccess
    • index.php
  • 13. Files: pub/xml/crossdomain.xml
    • <cross-domain-policy> <allow-access-from domain=&quot;zendamf.riafox.com&quot; /> </cross-domain-policy>
  • 14. Files: pub/.htaccess
    • RewriteEngine on RewriteRule ^(crossdomain.xml)$ pub/xml/crossdomain.xml [L] RewriteRule ^(gateway-config.xml)$ pub/xml/gateway-config.xml [L] RewriteRule !.(js|ico|gif|jpg|png|xml|swf)$ index.php php_flag magic_quotes_gpc off php_flag register_globals off php_flag display_errors on php_value session.auto_start 0
  • 15. Files: pub/index.html
    •  
    • error_reporting(E_ALL|E_STRICT); date_default_timezone_set('America/Boise'); $rootPath = dirname($_SERVER[&quot;DOCUMENT_ROOT&quot;]); define('APPLICATION_PATH', $rootPath . '/application'); set_include_path('.' . PATH_SEPARATOR . $rootPath.'/library' . PATH_SEPARATOR . $rootPath.'/application/models/' . PATH_SEPARATOR . $rootPath.'/application/library/' . PATH_SEPARATOR . APPLICATION_PATH . '/library/App/View/Helper/' . PATH_SEPARATOR . get_include_path()); session_save_path(APPLICATION_PATH . '/temp'); include &quot;Zend/Loader.php&quot;; $server = new Zend_Amf_Server(); $server->setProduction(false);$server->addDirectory('../application/models/');
    • $response = $server->handle(); 
    •   echo $response;
  • 16. Files: app/models/Test.php
    • <?php class Test{   public  function hello($text) {     return &quot;Message Received:{$text}&quot;;   } } ?>
    •  
  • 17. services-config.xml
    • <?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?> <services-config>     <services>         <service id=&quot;amfphp-flashremoting-service&quot; class=&quot;flex.messaging.services.RemotingService&quot; messageTypes=&quot;flex.messaging.messages.RemotingMessage&quot;>             <destination id=&quot;zend&quot;>                 <channels>                     <channel ref=&quot;my-zend&quot;/>                 </channels>                 <properties>                     <source>*</source>                 </properties>             </destination>         </service>     </services>     <channels>         <channel-definition id=&quot;my-zend&quot; class=&quot;mx.messaging.channels.AMFChannel&quot;>             <endpoint uri=&quot;http://zendamf.riafox.com/gateway.amf&quot; class=&quot;flex.messaging.endpoints.AMFEndpoint&quot;/>         </channel-definition>     </channels> </services-config>
  • 18. compiler settings
    • add -services &quot;C:path-to-servicesservices-config.xml&quot;
  • 19. main.mxml
    • <mx:RemoteObject id=&quot;myservice&quot;     fault=&quot;faultHandler(event)&quot;     showBusyCursor=&quot;true&quot;     source=&quot;Test&quot;     destination=&quot;zend&quot;>         <mx:method name=&quot;hello&quot; result=&quot;responseHandler(event)&quot; />     </mx:RemoteObject>
    •  
    • http://zendamf.riafox.com/public/test/main.html
  • 20. Resources
      • The ABCs of AMF Format
      • Ajax and Flex Data Loading Benchmarks
      • Wade Arnold Blog Zend AMF
      • ZF Programmer's Reference Guide
      • AMF3 Specifications
      • Latest Zend Framework Download
      • Zend AMF Download
      • Adobe 3.3 Language Reference  
  • 21. Questions? http://www.slideshare.net/riafox/zend-amf-and-flex   How to Find Us     @riafox @richbreton @ben_whitaker Web site: http://www.riafox.com