Current design of SimpleFeed

Here I would like to discover the current design of SimpleFeed, the project will be based on this module.

Parts

  • simplefeed.module
    • This is the core module
    • Implements node hooks (hook_delete, hook_insert, hook_load, etc), it treats the feed as a node
    • Provide a simple UI
    • Store informations about the feed
  • simplefeed_item.module
    • Implement the SimpleFeed hook system
    • Store informations about the feed items
    • Implements node hooks (hook_delete, hook_insert, hook_load, etc), it treats the feed items as a node too
    • UI for the feed item
  • simplepie.inc
    • Download and parse the feeds

SimpleFeed hook system

The following hooks are present:

  • feed_expire: Delete all expired feed items. It is called before the feeds are selected for refresh. Possible chance to regulate the for-refresh feeds.
  • feed_parse: Download the feed and parse. Return the items
  • feed_save: Create the whatever content (actually nodes) from the items
  • feed_validate: Determine if the feed that the user wants to create is acceptable or not (currently: check the URL scheme)


Life of the feed


Here I used some pseudo-function name to achieve simplier sequence diagram.