#128: Pluggable Plone Syndication (PPS)
- Contents
Enable advanced (RSS 2.0, Atom) site-wide syndication on all ATCT content "out-of-the-box" using Zope 3-based adaptors (via Five) which are extendable beyond ATCT to any content type.
- Proposed by
- Tom Lazar
- Seconded by
- Nate Aune
- Proposal type
- Architecture
- Repository branch
- trunk
- State
- rejected
Definitions
ATCT = ATContentTypes
Vice - a new tool for generating RSS and Atom feeds from Plone content. Only works on Plone 3.x.
basesyndication = a "pure" Zope3 component that provides syndication
templates (RDF, RSS, RSS2 and Atom) for objects providing its
interfaces.
fatsyndication = a syndication product that provides adapters for
basesyndication to allow basic syndication of any AT-based content
(this and basesyndication served as inspiration for PPS).
PloneboardSyndication = an example product which uses fatsyndication
and basesyndication to provide adapters to syndicate Ploneboard discussion
threads and comments.
FiveFeeds = tutorial by Philipp von Weiterhausen that shows how to
extend Plone to support the Atom syndication format in addition to RSS
by using Zope 3 technologies.
Motivation
- The current portal_syndication tool only provides feeds in the RSS 1.0 format, which doesn't have support for enclosures (RSS 2.0 and Atom do).
- Also, that tool doesn't provide any means for extending syndication beyond the common object attributes (i.e. Title, description, body etc.)
- The current approach doesn't support different types of feed entries for different content types (i.e. enclosures for media content a.k.a. podcasting)
Assumptions
As this product will be based on Zope 3 technologies for use in Zope 2, we assume the user will have Zope 2 installed with Five (including Zope 3): i.e. minimum Plone 2.1.1, Zope 2.8.
Current additional dependencies are:
ATContentTypes -> /opt/zope/collective/ATContentTypes/trunk Archetypes -> /opt/zope/archetypes/Archetypes/branches/1.4 CMFDynamicViewFTI -> /opt/zope/collective/CMFDynamicViewFTI/trunk
Proposal
PPS will improve the possibilities of using plone "out-of-the-box" for
blogging without requiring a dedicated blogging application or
blogging-specific content types.
Additionally it will provide adapters and interfaces for other
components to adapt to in order to implement buzzword-functionality
such as podcasting, vodcasting, photocasting and cheesecasting.
One can then use iTunes or other RSS 2.0 clients to subscribe to rich
media feeds comprised from audio/video content that has been uploaded
to your Plone site.
Similarly, one can use iPhoto or other RSS 2.0 clients to subscribe to
a photocast feed of photos that you have uploaded to your Plone site.
It still remains to be seen how we will implement cheese feeds. See
PLIP #87.
The implementation will be developed such that it is not AT specific -
a Zope 3 adaptor can be written for any current/future content type to
allow that content to be included in the advanced syndication.
Implementation
- Make an adapter to syndicate ATNewsItems. Once we have this working, make adapters for the other content types:
- page, event, favourite, file, image, link
- a special case is the Smart Folder because it is generating dynamic lists of content. This will make it possible to
create feeds of certain types of content on your site, or aggregated feeds based on criteria you specify. - Use ATCT's new z3-interfaces (currently only in jfroche's z3-branch)
why not build on existing base-/ and fatsyndication?
short answer: keep it simple ;-)
long answer: Building on those two products was our inital idea. upon closer examination it was discovered, that fatsyndication is tailored for being used as an aggregator tool and thus introduces the concept of syndication managers, feed sources and feeds which we found cumbersome to adapt for our use case.
the next stage was then to use basesyndication for template generation just as fatsyndication itself does. However, basesyndication doesn't utilize viewclasses and its templates contain many python-statements. Additionally it also has the concept of aggregation/abstraction hardcoded into its design. While fixing it to use viewclasses and to clean up the templates themselves would have been feasible, we don't want to fundamentally change the architecture of an existing product just to suit our usecase ;)
ATCTSyndication is as much an exercise in "best practices using Five" as an actual tool, so we decided to start from scratch. Once sufficiently under way it is planned to factor out the templates and viewclasses into a archetypes independant product which can then be used to adapt to from "pure" Zope3 use cases.
Finally, if we had trouble adapting to it, so might others after us, who want to extend their ATCT types to use syndication.
Deliverables
ATCTSyndication product will provide adapters for the default ATContentTypes that come with Plone.
Risks
The team is unfamiliar with Five and Zope3 and the use of adapters. We
will be relying on the knowledge of those who have come before us,
namely Russ and Jean-Francois who have already ventured down this path
with their ATImage/ATPhoto explorations.
Eat too much cheese and fail to finish coding. Drink too much coffee and bounce off the wall. Drink too much Jagermeister and fall of our chairs.
Progress log
2006-Feb-09
- converted to using z3-interfaces from ATContentTypes. Important: new dependencies introduced (see above)
responded to Jon Stahls comment re: not using base- and fatsyndication (in Implementation section) <tomster>
- made new branch for enclosures support <natea>
2006-Feb-04
- added rudimentary tests (verifyClass) - no failures ;-)
- added ATNewsItem specific adapter as proof-of-concept (provides NewsItem specific body text but inherits all other fields from ATFeedEntry)
- removed marker interfaces for ATContentTypes and instead bridge to existing Zope2 interfaces of ATContentTypes directly (pending Zope3 interfaces in ATContentTypes). Introduced dependency on ATContentTypes/trunk.
2006-Feb-03
- Extended prototype to
actually include entries for each object contained inside the folderish
object for which the atom feed is applied.
- Some of the fields required by the Atom spec are still dummy content.
- But the output validates ;-)
2006-Feb-02
- Created first vertical prototype from scratch which delivers an Atom Feed for any folderish object (but w/o Entries, yet).
- Decision to entirely abandon basesyndication and fatsyndication products because they have a much richer use case (mainly aggregation).
- We now follow along the lines of the FiveFeed tutorial instead.
2006-Feb-01
- 3:30 PM: Imported ATCTSyndication skeleton into collective.
- 4:00 PM: Finalized this PLIP.
Participants
Nate Aune
Tom Lazar
Rick Hurst
Ben Ackland
Updates / Adjustments ?
I suggested that we create something simply called "syndication" which perhaps is not entirely zope-bound. view classes for iterators?