Ideas for aggregator

Aug 16, 2005 15:48


I have some ideas for commingler. To be truthful, they're not all my ideas, but they're things I want to do nonetheless.
  • Fetcher stores posts in db
  • Posts get assigned unique post_id
  • Original permalink used to uniquely identify post, but a simple integer post_id is assigned
  • post_id starts at 1000 and counts up
  • Main page built statically after each fetch
  • New permalinks generated dynamically, identified by post_id, pulled from db
  • Perhaps optionally generate a new static permalink

I'd also like to refactor the code into appropriate classes. Hopefully I don't end up refactoring it into oblivion, but I think it would be neat to reduce the main loop to something along the lines of:

my $fetcher = Commingler::Fetcher->new; my $db = Commingler::DB->new; my $renderer = Commingler::Renderer->new; for ($fetcher->posts) { my $post_id = $db->add_post($_); $renderer->queue($post_id, $_); } print $renderer->output;
Update: on second thought, that would probably be more like:

my $fetcher = Commingler::Fetcher->new; my $db = Commingler::DB->new; my $renderer = Commingler::Renderer->new; for ($fetcher->posts) { my $post_id = $db->add_post($_); $renderer->queue($post_id, $_); } for ($renderer->templates) { $_->write_out; }
Previous post Next post
Up