[geeklog-devel] Dynamic Feeds for Soc

Dirk Haun dirk at haun-online.de
Fri Mar 19 15:30:04 EDT 2010


jamil haider wrote:


>I am Jamil Haider doing computer engineering from Pakistan. I was
>interested in adding support for dynamic feeds with access control. On
>the ides page it was written that there will be need for simplification
>of Plugin API for feeds. Any pointers pertaining to that required
>simplification are welcome.

Well, currently plugins have to duplicate a lot of code when they
provide a feed. The question here was whether this code duplication
could be avoided.

Maybe I'll better start with the second part of your question:

>I am also bit confused about the scope of
>the project because it seems that to implement this feature I will have
>to poke into many different areas.

Generally speaking, the code that actually creates the feed in the
various formats is in system/classes/syndication. Above that is system/
lib-syndication.php, which is either called through the Plugin API or in
some cases directly (for article feeds).

I'd suggest you have a look at what happens when you save a new story -
follow the calls through COM_rdfUpToDateCheck down to writing the feed
file. Then do the same for a plugin that supports feeds, e.g. the
Calendar plugin.

When you follow both paths, you'll see the duplicated code I mentioned
above. If you see a chance to reduce or eliminate that code duplication,
that would be welcome. But that's only the bonus part of this project.

Yes, this project would potentially touch on many different areas of the
code. Currently, when a new item is saved or an item is updated,
COM_rdfUpToDateCheck is called and all feeds the that are affected are
updated.

Dynamic feeds will have to work the other way around: A request for a
feed comes in and the items in it need to be collected and delivered.

For some sort of feeds, there may be a middle ground: The stories for a
feed (or rather, their story id), for example, could be cached in the
database. But this won't work for a feed for searches.

Part of the research for this project should be to figure out how far we
could go (technically and realistically, given the constraints of the
Summer). In some systems, you can turn pretty much every URL into an RSS
feed by attaching some parameter to it. Something like that is pretty
cool but probably not realistic for Geeklog. But some of the more
dynamic examples listed on the ideas page (feed for moderation, feeds
for search) seem to be within reach and would be very useful.

Hope that helps :)

bye, Dirk


-- 
http://www.geeklog.net/
http://geeklog.info/




More information about the geeklog-devel mailing list