Skip to end of metadata
Go to start of metadata

Zend Framework: Zend_Feed_Writer_Extension_MediaRSS Component Proposal

Proposed Component Name Zend_Feed_Writer_Extension_MediaRSS
Developer Notes http://framework.zend.com/wiki/display/ZFDEV/Zend_Feed_Writer_Extension_MediaRSS
Proposers Justin Hart
Revision 1.0.0 - 02 April 2010 (wiki revision: 6)

Table of Contents

1. Overview

The MediaRSS Specification is an extension to RSS 2.0 which is also compatible as an extension to Atom. Yahoo created the specification in 2004 and has been updated up to version 1.5.0 in September 2009. It is currently under 'supervision' by the RSS Advisory board (revision 1.5.1).

2. References

See above for copies of related Specifications.

3. Component Requirements, Constraints, and Acceptance Criteria

  • This component will implement the ability to add MediaRSS Groups, Content and common elements to RSS and Atom feeds generated by Zend_Feed_Writer
  • This component will implement the most recent version of the MediaRSS specification

4. Dependencies on Other Framework Components

  • Zend_Feed_Writer
  • Zend_Uri
  • Zend_Feed_Writer_Extension_GeoRSS (proposal)

5. Theory of Operation

The MediaRSS specification allows for elements on various levels of the feed structure, so many of the components are moved into shared objects to reduce duplication.

Generally, one will:

  1. Create a new Zend_Feed_Writer_Feed
  2. Create a new Zend_Feed_Writer_Entry
  3. Create a new Zend_Feed_Writer_Extension_MediaRSS_Group
    • defines <media:group> element(s)
  4. Create a new Zend_Feed_Writer_Extension_MediaRSS_Content
    • defines <media:content> element(s)
  5. Create a new Zend_Feed_Writer_Extension_MediaRSS_Elements
    • defines the shared elements (like <media:thumbnail>, <media:title>)
  6. Add Elements to the Content node
  7. Add Content node to the Group node
  8. Add Group node to the Entry node
  • To Feed nodes, one can add:
    • MediaRSS_Elements
  • To Entry nodes, one can add:
    • MediaRSS_Group (many)
    • MediaRSS_Content (many)
    • MediaRSS_Elements (one)
  • To MediaRSS_Group nodes, one can add:
    • MediaRSS_Content (many)
    • MediaRSS_Elements (one)
  • To MediaRSS_Content nodes, one can add
    • MediaRSS_Elements (one)

The nodes as added will then render into the feed using the Zend_Feed_Writer_Extension_MediaRSS_Renderer counterparts.

6. Milestones / Tasks

  • Milestone 1: Write unit tests capturing the object interface (complete)
  • Milestone 2: Write the code required to pass all unit tests (complete)
  • Milestone 3: Write unit tests capturing the output interface (dom) (incomplete)
  • Milestone 4: Write the code required to pass unit tests (code Proof of Concept done)
  • Milestone 3: Write integration tests to cover various edge cases
  • Milestone 5: Complete documentation

7. Class Index

  • Zend_Feed_Writer_Extension_MediaRSS_Content
  • Zend_Feed_Writer_Extension_MediaRSS_Elements
  • Zend_Feed_Writer_Extension_MediaRSS_Entry
  • Zend_Feed_Writer_Extension_MediaRSS_Feed
  • Zend_Feed_Writer_Extension_MediaRSS_Group
  • Zend_Feed_Writer_Extension_MediaRSS_Renderer_Content
  • Zend_Feed_Writer_Extension_MediaRSS_Renderer_Elements
  • Zend_Feed_Writer_Extension_MediaRSS_Renderer_Entry
  • Zend_Feed_Writer_Extension_MediaRSS_Renderer_Feed
  • Zend_Feed_Writer_Extension_MediaRSS_Renderer_Group

Each of these classes also has a Test counterpart.

8. Use Cases

Use cases are currently being drafted.

UC-01

This is a case adding the deepest level of nodes (elements inside content inside group inside entry)

UC-02

This is probably the most typical case, where a feed may provide one thumbnail/full image on an entry

9. Class Skeletons

Refer to public repository:

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

    Archiving this proposal, feel free to recover it when you want to work on it again. For more details see this email.