Zend Framework: Zend_Service_Prowl Component Proposal
| Proposed Component Name | Zend_Service_Prowl |
|---|---|
| Developer Notes | http://framework.zend.com/wiki/display/ZFDEV/Zend_Service_Prowl |
| Proposers | Christopher Thomas |
| Zend Liaison | TBD |
| Revision | 1.0 - 24 December 2009: Initial Draft. 1.1 - 20 January 2010: Changed API per commenter's suggestion. Changed usecases. (wiki revision: 7) |
Table of Contents
1. Overview
Zend_Service_Prowl is a simple component that implements the Prowl API. Prowl is a service that allows users to send push notifications to the iPhone or iPod.
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This component will send a push notification to up to 5 users at a time.
- This component will send a verification request to the web service.
4. Dependencies on Other Framework Components
- Zend_Http
- Zend_Service_Exception
5. Theory of Operation
- Create a new Zend_Service_Prowl object. Pass api key(s) into the constructor.
- Set message, event, and priority
- Call the add() method to send message.
- Call the getReturnCode() method to see if successful.
6. Milestones / Tasks
- Milestone 1: [DONE]Write up proposal and stub out a class
- Milestone 2: [DONE]Create working prototype
- Milestone 3: Create Unit tests
- Milestone 4: Get working prototype into the incubator SVN
- Milestone 5: Create initial documentation
- Milestone 6: Change code and docs based on feedback
7. Class Index
- Zend_Service_Prowl
8. Use Cases
| UC-01 |
|---|
| UC-02 |
|---|
| UC-03 |
|---|
9. Class Skeletons
Labels:
None
7 Comments
comments.show.hideJan 19, 2010
Alex Howansky
I don't think you should require the programmer using this class to know that a return code of 200 means success, so I'd suggest making isSuccessful() and isError() methods like in Zend_Http_Response. Then, given that, it seems that it's not necessary to expose the actual return code at all.
Jan 20, 2010
Christopher Thomas
Good suggestion. Made the changes. Also fixed some other stuff.
Jan 19, 2010
Kevin McArthur
I'm wondering if this would be better as a log-writer service plugin. Much like the wildfire interface.
Mar 11, 2010
Colin Guthrie
Interestingly I was just about to suggest something similar. I rather thought that an additional log writer class could expand on this.
I'm not 100% sure what you're suggesting in practical terms as I don't find any (relevant) reference to Log stuff in Zend_Wildfire "namespace" There is obviously a Zend_Log_Writer_Firebug which does the job and uses Zend_Wildfire stuff but I'm not sure why that is specifically "better".
Anyway a way to send err() messages via push notification sounds like a good idea
Jan 26, 2010
Pieter
Good work on the proposal. A Prowl service has been on my todo list for quite a while.
A couple of comments on your proposal;
- Not too sure about the add() method. I would call it send() as its closer to what is actually happening.
- Using isSuccessful() / isError() as a separate method seems a bit cumbersome. You could consider letting the add() method return a boolean upon success / failure. This will save some code.
- I would change the verify() method to isValidApiKey($apiKey) which returns a boolean. Bit clearer what it's actually doing and will allow you to not having to set the key first.
Feb 08, 2011
Dolf Schimmel (Freeaqingme)
Archiving this proposal, feel free to recover it when you want to work on it again. For more details see this email.
Jul 03, 2011
Robert Allen
If I can be of any assistance with this please let me know, I am more then happy to pick it up or even collaborate on it to keep it going.
--zircote