Zend_Mobile_Push is a component for implementing push notifications for the 3 major push notification platforms (Apple (Apns), Google (C2dm), and Microsoft (Mpns). The actual implementation is based on mostly abstraction. Specifications / Implementation Guides
Other Implementations APNS C2DM MPNS
Proposed Component Name
1.1 - 28 November 2011: Initial Draft. (wiki revision: 6)
Zend_Mobile_Push is a component for implementing push notifications for the 3 major push notification platforms (Apple (Apns), Google (C2dm), and Microsoft (Mpns). The actual implementation is based on mostly abstraction.
Specifications / Implementation Guides
- This component will implement base interfaces along with an abstract class to attempt to bundle common behaviors
- This component will implement the current specifications for APNS, C2DM and MPNS.
- This component will throw exceptions that should be caught (InvalidAuth, InvalidToken, etc)
- This component will not handle the storage of tokens or ID's (no implementation of a persistent storage state).
- This component will not attempt to handle re-connections or exponential back off.
- This component will not provide a server component that runs in the background.
- This component will not interface with a logger.
Zend_Http_Client - for implementation of sending messages to C2DM and MPNS.
Zend_Filter_Alpha - for filtering out dynamic text to ensure alpha characters.
Zend_Loader - for dynamically loading exception classes based on responses.
The operation of this component is very simple. It is based simply off of interfaces and abstract classes to implement the server and messages. All common operations have been stated there. The instances of each type of message does not make sense in the context of an abstract factory or a factory at all since each must be implemented in a specific way. Each individual instance must be explicitly stated such as "new Zend_Mobile_Push_C2dm()" including the type of message "new Zend_Mobile_Push_Message_C2dm".
Generally an instance of the client will be created followed by a message that will be passed to the send method of the client. Every attempt was made to standardize some of the handling of each individual item.
- Milestone 1: Finish proposal and architectural description. [Done]
- Milestone 2: Working prototype. [Done]
- Milestone 3: Unit tests exist, work, and are checked into github. [Partially Done]
- Milestone 4: Refinements [Not Done]
- Milestone 5: Initial documentation exists. [Not Done]
Sending an APNS Message
Feedback of an APNS Message
Sending a C2DM Message
Sending a MPNS Raw Message
Sending a MPNS Toast Message
Sending a MPNS Tile Message