Keep It Simple, Stupid | |
PerlMonks |
Re: Dispatchers for dummiesby aufflick (Deacon) |
on Oct 16, 2008 at 00:52 UTC ( [id://717377]=note: print w/replies, xml ) | Need Help?? |
I don't know what it is, but I quite like web dispatchers too :) In my HTTP::Server::Brick I followed a simple declarative approach. I've always liked the OpenACS request processor. In your installation you have a number of standard packages (eg. comments, admin) and you write your own packages for your functionality. You can then instantiate your package (maybe more than once) on a sub-url of your choosing. Instantly all the url paths offered by that package are available relative to that mount point. Since you can instantiate more than once, your code is able to introspect which instance it is to make sure it is, say, retrieving the right blog entries from the database. OpenACS is built on top of AOLServer which follows a fairly standard declarative dispatcher design where you call a tcl api to register a proc against a particular url.
In Section
Meditations
|
|