Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[

Zend Framework: Zend_AMF Component Proposal

Proposed Component Name Zend_AMF
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_AMF
Proposers Wade Arnold
Zend Liaison Stanislav Malyshev
Revision 1.0 - 1 January 2008: Initial Draft. (wiki revision: 4)

Table of Contents

1. Overview

Zend_AMF3_Server provides Action Message Format (AMF) support for the Zend Framework that is compatible with the Flash Player. The Adobe Integrated Runtime (AIR) and Flash Player use AMF to communicate between an application and a remote server. AMF encodes remote procedure calls (RPC) into a compact binary representation that can be transferred over HTTP/HTTPS protocol. Objects and data values are serialized into this binary format, which increases performance as the AMF serialization is a highly optimized procedure in the Flash Player. Zend_AMF3_Server will act as an AMF gateway to the Zend Framework by exposing through introspection custom class objects and functions that will respond as callbacks through the Zend_AMF3_Server gateway.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

Most requirements take the form of "foo will do ...." or "foo will not support ...", although different words and sentence structure might be used. Adding functionality to your proposal is requirements creep (bad), unless listed below. Discuss major changes with your team first, and then open a "feature improvement" issue against this component.

  • This component will correctly reads a developers mind for intent and generate the right configuration file.
  • The generated config file will not support XML, but will provide an extension point in the API.
  • This component will use no more memory than twice the size of all data it contains.
  • This component will include a factory method.
  • This component will not allow subclassing. (i.e. when reviewed, we expect to see "final" keyword in code)
  • This component will only generate data exports strictly complying with RFC 12345.
  • This component will validate input data against formats supported by ZF component Foo.
  • This component will not save any data using Zend_Cache or the filesystem. All transient data will be saved using Zend_Session.

4. Dependencies on Other Framework Components

  • PHP5
  • PHP Zlib
  • Zend_Exception
  • Zend_Server_Interface
  • Zend_Server_Reflection

5. Theory of Operation

Zend_AMF3_Server is composed of several components, ranging from the server itself to request, response, encoding, decoding, and fault objects.

To implement Zend_AMF3_Server, the developer must attach one or more classes or functions to the server instantiation, via the setClass() and addFunction() methods.

The Zend_AMF3_Server will decode request objects that are received via php://input and deserialized the request and check for an existing instantiated session. Zend_AMF3_Server will check the AMF header for the matching name space of the requested remote object to be called. The remote object will be instantiated and the result of the method call will be serialized and returned to the requested http connection.

6. Milestones / Tasks

Zend_AMF3_Server_HTTP handle incoming requests.
Zend_AMF3_Server_Serialization
Zend_AMF3_Server_Deserialization
Add the following data types in order.
AS PHP
Null null
boolean boolean
String string
Array array
Object associative array
XML string
Date float *not in first release
ArrayCollection Resource *not in first release

Zend_AMF3_Server_Fault
Work on handling fault events eloquently.

7. Class Index

  • Zend_Magic_Exception
  • Zend_Magic (factory class)
  • Zend_Magic_MindProbe
  • Zend_Magic_MindProbe_Intent
  • Zend_Magic_Action
  • Zend_Magic_CodeGen

8. Use Cases

UC-01

... (see good use cases book)

9. Class Skeletons

]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.