Skip to end of metadata
Go to start of metadata

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

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

Zend Framework: Zend_Service_Gravatar Component Proposal

Proposed Component Name Zend_Service_Gravatar
Developer Notes
Darby Felton, Zend liaison
Revision 0.1 - 9 April 2007: Initial version
0.2 - 25 July 2007: Added some use cases, corrected small mistakes
0.3 - 6 August 2007: Improved class skeletons (wiki revision: 16)

Table of Contents

1. Overview

Zend_Service_Gravatar is a implementation of the Gravatar web service.

2. References

3. Component Requirements, Constraints, and Acceptance Criteria

  • Abillity to generate valid URI for avatar using email adress
  • Provide a way of configuring avatar rating, avatar size, and default avatar adress
  • Provide a method to check if the avatar image exists
  • Provide getter and setter to allow change email adress after instantiation

4. Dependencies on Other Framework Components

  • Zend_Http_Client
  • Zend_Service_Exception

5. Theory of Operation

Generates uri of gravatar, checks if gravatar's file exists.

6. Milestones / Tasks

  • Milestone 1: [DONE]Design notes will be published here
  • Milestone 2: [DONE]Class skeletons will be published here
  • Milestone 3: [DONE]Working prototype checked into the incubator supporting use cases #1, #2, #3, #4 and #5.
  • Milestone 4: [DONE]Unit tests exist, work, and are checked into SVN.
  • Milestone 5: [DONE]Initial documentation exists.

7. Class Index

  • Zend_Service_Gravatar

8. Use Cases

9. Class Skeletons



Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jul 13, 2007

    <p>Could we see some more use cases to illustrate how the methods besides <code>getUri()</code> would be used and how they would behave?</p>

    <p>For example, in which situations does the <code>isValid()</code> method return <code>false</code>, or does it always throw an exception if it does not return <code>true</code>?</p>

    <p>Looks good so far; I look forward to seeing some more details fleshed out a bit more, and then we should be able to drive this into the incubator very soon! <ac:emoticon ac:name="smile" /></p>

  2. Jul 25, 2007

    <p>Thanks for your comment, Darby.</p>

    <p>I've added some use cases and more detailed description of isValid() method.</p>

    <p>I've also changed the scope of getQuery method to protected.</p>

  3. Jul 29, 2007

    <p>I create a small view helper for this once, heh...</p>

  4. Aug 03, 2007

    <ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comments</ac:parameter><ac:rich-text-body>
    <p>This proposal is approved for incubator development.</p>

    <p>Web service components can be tricky to unit test. Generally, the more unit test code coverage that we can get without requesting the live web services for each test run, the better. In many cases, you can utilize <code>Zend_Http_Client_Adapter_Test</code> for injecting content for testing without querying live web services. Please see unit test suites for other <code>Zend_Service_*</code> components for examples.</p>

    <p>Any tests that do utilize online web services should be off by default, using directives from <code>TestConfiguration.php.dist</code>.</p></ac:rich-text-body></ac:macro>

  5. Mar 18, 2009

    <p>No updates on this one for the past 6 months. Archiving for now.</p>

  6. Aug 14, 2009

    <p>I don't see why this could not just be a view helper. It seems simple enough to do with out needing a way to fetch the data from gravatar. I would like to take over this proposal and switch it up to be a view helper instead of a full blown service component.</p>

    <p>Does anyone have any objections to it?</p>

    1. Aug 26, 2009

      <p>Jon, </p>

      <p>I've written a View Helper for this already. Send me an email at if you want a copy of the code. I'd like to refactor it a little, and even thought about separating it into a View Helper that depends on the Service to be abstracted out a little better.</p>

  7. Dec 18, 2009

    <p>I have also created a Zend_View_Helper however, I think a Service could be created for this with the XMLRpc Gravatar service <a class="external-link" href=""></a> </p>

    <p>I would like to revive this proposal and create the service. I think the helper is good for most people but the administrative handling of your avatar can be done through the gravatar service.</p>


  8. Dec 19, 2009

    <p>I think the possiblity to set a Zend_Cache to the component for caching the answer of the http-requests would be nice.</p>

    <p>Another nice thing out of the context of the proposal would be a component which allows local caching of the images so that there is no need for including external images.</p>