Zend Amf And Flex

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    4 Favorites

    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
    SlideShare Zeitgeist 2009

    + riafoxriafox Nominate

    custom

    23716 views, 4 favs, 0 embeds more stats

    Introsuction to using Zend AMF with Zend Framework more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 23716
      • 23716 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 4
    • Downloads 46
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags