[Welcome] [TitleIndex] [WordIndex

Notes on Slashcode

Slashcode provides the bones of a fairly generic web application system, though you'd never know it by looking at http://slashdot.org. A Slashcode theme is "the base code that generates pages, the base code that runs in the background, and [it includes] variables that control most tunable parameters." The various Perl Slash:: packages provide an API that's generically useful.

Solidus, however, will only try to recreate the functionality of Slashdot as it currently stands, and not the generic web application system that is Slashcode. One reason is that we already have such a system and it's called Quixote. Another is that no one seems to have actually used Slashcode for anything else, judging by my inability to find any such themes via Google. People only seem to take the existing Slashdot page layout and tweak it a bit.

The PostgreSQL schema included in the Slashcode tarball is out of date; only the MySQL schema is current. I'm using SQLObject to handle schema creation.


DB.pm is the big one, with methods for getting user objects, story objects, etc.

Display.pm is the point where DB.pm and the Template module are tied together.

Those are about the only two that matter.


A theme consists of a number of subdirectories. htdocs/ contains scripts and static content; tasks/ contains scripts for the various tasks to be executed; templates/ is a whole bunch of templates written using the Template toolkit (vaguely ASP-like; YA templating language).

Daemons/cron jobs

portald -- pulls down RSS headlines and makes them visible on the site (not sure how yet -- do they go into the database, or into a file someplace?)

slashd -- daemon that periodically runs the tasks in themes/slashcode/tasks . The Perl code for each task sets a $minutes_run variable to specify how frequently the task needs to run.

2010-09-22 22:14