KEMBAR78
Ria Development With Flex And PHP | PPT
Building RIA with Zend Framework and PHP John Coggeshall Automotive Computer Services
Who am I: John Coggeshall Chief Technology Officer, Automotive Computer Services PHP Core Contributor Former Sr. member of Zend Technologies Global Services Author, geek, etc. Welcome Jun 4, 2009   |     |
Agenda today Today we’re going to talk about building RIA applications in PHP Specifically using Adobe Flex / AIR and PHP / Zend Framework Discuss everything about creating the application Development Environment and Tooling Client-side Architecture Server-side Architecture Pulling it together Demos Jun 4, 2009   |     |
Our Challenge ACS has an existing system for managing car dealerships nationwide Pure Client-side Really old (written in Visual FoxPro!) Current goal: Complete re-implementation of product as a thin-client application Need to retain desktop-like functionality Adobe AIR / Flex was selected as our GUI Jun 4, 2009   |     |
Why Flex? Why AIR? Originally numerous options were considered for the front-end HTML/JS using FireFox 3 XUL / JS  Flex offered the most reasonable rich-client solution Extremely Rapid UI Development when compared to HTML / JS Much more extendable / customizable then XUL / JS AIR gave us more client-side flexibility Access to Local file system  Access to local Hardware (or at least, we had options) Jun 4, 2009   |     |
Our Technology Stack Our Development Environment: Zend Studio for Eclipse with numerous plug-ins Flex Builder 3 Pro Plug-in LogWatcher (GUI tail –f) VMWare Virtual Machine for server CentOS powered running Zend Core MySQL 5.x database Our Development Stack Server: PHP 5.2 w/ Zend Framework 1.6 Client: Adobe Actionscript 3 / Flex w/PureMVC Jun 4, 2009   |     |
Client-Side Architecture Based on PureMVC  ( http://www.puremvc.org ) Singleton Controller, Model, View Views are managed by Mediators Models are implemented by Proxies Controller actions are implemented through Commands Jun 4, 2009   |     |
Client-side Architecture Primary communication via Notify/Observer pattern (Proxies cannot observe) Mediators bridge between Flex’s event model and the application Proxies communicate with data sources Jun 4, 2009   |     |
Server-Side Architecture RESTful services (currently) using e4x as its data transport e4x is well supported in Flex, very easy to work with Looking into AMF support in the near future (Zend_Amf) MVC pattern with one controller Action specifies the version Controller Maps the request URI to a class implementing the Command pattern Uses Zend Framework’s Plugin Architecture Jun 4, 2009   |     |
Server-Side Architecture http://host/service/v1/command/auth.login Maps to the ACS_Command_Auth_Login class The execute() method is called Located in ACS/Command/Auth/Login.php Commands are given a reference to Zend_Controller as well to provide context Full access to request, etc. Views are also then mapped to command name I.e. auth-login.xml.phtml Jun 4, 2009   |     |
Server-Side Architecture Wanted to have the ability to allow front-end engineers to work without needing real services Solution: Implement a dummy-xml ability into our services by including the ?dummy=1 GET parameter in our request Behind the curtain, our ZF architecture will automatically find a dummy .xml file for a response Jun 4, 2009   |     |
Pulling it together Now that we have both sides how can we more cleanly tie them together? Already have a single IDE to do all development in Extending the ActionScript HttpClient class to incorporate more stuff Enhancement #1: No need to specify a URL, just the service name Enhancement #2: Built-in support for “dummy” service requests Enhancement #3: Support for the Zend Studio Debugger Jun 4, 2009   |     |
End-to-End Debugging and Profiling Flex has a great Debugger / Profiler for Flex Zend Studio for Eclipse has a great Debugger / Profiler for PHP By extending the HttpClient Class, we can create a seamless end-to-end debug or profiling session using real web service requests Already has saved us once hunting a very nasty bug Jun 4, 2009   |     |
What more can we do? Web service developers need to document their services We need to create application usage documentation All documentation is written in DocBook format and stored in the repository Developer guide can be seamlessly integrated into Eclipse using a custom Plugin User Guide can be converted into HTML and shipped with product in chunk format (contextual help) Jun 4, 2009   |     |
Demo Let’s see a demo of everything in action! Jun 4, 2009   |     |
What do we dislike? As you can tell we’re very happy with AIR/Flex for the most part.. What is bad? Deferred Instantiation can be a real pain Sort of a memory / resource hog Very easy to do write bad code in Flex Lack of a fully-baked Unit Testing facility Jun 4, 2009   |     |
Thank you! Questions?

Ria Development With Flex And PHP

  • 1.
    Building RIA withZend Framework and PHP John Coggeshall Automotive Computer Services
  • 2.
    Who am I:John Coggeshall Chief Technology Officer, Automotive Computer Services PHP Core Contributor Former Sr. member of Zend Technologies Global Services Author, geek, etc. Welcome Jun 4, 2009 | |
  • 3.
    Agenda today Todaywe’re going to talk about building RIA applications in PHP Specifically using Adobe Flex / AIR and PHP / Zend Framework Discuss everything about creating the application Development Environment and Tooling Client-side Architecture Server-side Architecture Pulling it together Demos Jun 4, 2009 | |
  • 4.
    Our Challenge ACShas an existing system for managing car dealerships nationwide Pure Client-side Really old (written in Visual FoxPro!) Current goal: Complete re-implementation of product as a thin-client application Need to retain desktop-like functionality Adobe AIR / Flex was selected as our GUI Jun 4, 2009 | |
  • 5.
    Why Flex? WhyAIR? Originally numerous options were considered for the front-end HTML/JS using FireFox 3 XUL / JS Flex offered the most reasonable rich-client solution Extremely Rapid UI Development when compared to HTML / JS Much more extendable / customizable then XUL / JS AIR gave us more client-side flexibility Access to Local file system Access to local Hardware (or at least, we had options) Jun 4, 2009 | |
  • 6.
    Our Technology StackOur Development Environment: Zend Studio for Eclipse with numerous plug-ins Flex Builder 3 Pro Plug-in LogWatcher (GUI tail –f) VMWare Virtual Machine for server CentOS powered running Zend Core MySQL 5.x database Our Development Stack Server: PHP 5.2 w/ Zend Framework 1.6 Client: Adobe Actionscript 3 / Flex w/PureMVC Jun 4, 2009 | |
  • 7.
    Client-Side Architecture Basedon PureMVC ( http://www.puremvc.org ) Singleton Controller, Model, View Views are managed by Mediators Models are implemented by Proxies Controller actions are implemented through Commands Jun 4, 2009 | |
  • 8.
    Client-side Architecture Primarycommunication via Notify/Observer pattern (Proxies cannot observe) Mediators bridge between Flex’s event model and the application Proxies communicate with data sources Jun 4, 2009 | |
  • 9.
    Server-Side Architecture RESTfulservices (currently) using e4x as its data transport e4x is well supported in Flex, very easy to work with Looking into AMF support in the near future (Zend_Amf) MVC pattern with one controller Action specifies the version Controller Maps the request URI to a class implementing the Command pattern Uses Zend Framework’s Plugin Architecture Jun 4, 2009 | |
  • 10.
    Server-Side Architecture http://host/service/v1/command/auth.loginMaps to the ACS_Command_Auth_Login class The execute() method is called Located in ACS/Command/Auth/Login.php Commands are given a reference to Zend_Controller as well to provide context Full access to request, etc. Views are also then mapped to command name I.e. auth-login.xml.phtml Jun 4, 2009 | |
  • 11.
    Server-Side Architecture Wantedto have the ability to allow front-end engineers to work without needing real services Solution: Implement a dummy-xml ability into our services by including the ?dummy=1 GET parameter in our request Behind the curtain, our ZF architecture will automatically find a dummy .xml file for a response Jun 4, 2009 | |
  • 12.
    Pulling it togetherNow that we have both sides how can we more cleanly tie them together? Already have a single IDE to do all development in Extending the ActionScript HttpClient class to incorporate more stuff Enhancement #1: No need to specify a URL, just the service name Enhancement #2: Built-in support for “dummy” service requests Enhancement #3: Support for the Zend Studio Debugger Jun 4, 2009 | |
  • 13.
    End-to-End Debugging andProfiling Flex has a great Debugger / Profiler for Flex Zend Studio for Eclipse has a great Debugger / Profiler for PHP By extending the HttpClient Class, we can create a seamless end-to-end debug or profiling session using real web service requests Already has saved us once hunting a very nasty bug Jun 4, 2009 | |
  • 14.
    What more canwe do? Web service developers need to document their services We need to create application usage documentation All documentation is written in DocBook format and stored in the repository Developer guide can be seamlessly integrated into Eclipse using a custom Plugin User Guide can be converted into HTML and shipped with product in chunk format (contextual help) Jun 4, 2009 | |
  • 15.
    Demo Let’s seea demo of everything in action! Jun 4, 2009 | |
  • 16.
    What do wedislike? As you can tell we’re very happy with AIR/Flex for the most part.. What is bad? Deferred Instantiation can be a real pain Sort of a memory / resource hog Very easy to do write bad code in Flex Lack of a fully-baked Unit Testing facility Jun 4, 2009 | |
  • 17.