Sites and Modules
From CunningPlans
In a Baldrick installation, a master configuration file defines a Site. A Site generally has one Session Manager and one User Loader defined, thus functioning as a single entity from the user's perspective.
Within one Site there can be many Modules. A Module is a self-contained piece of functionality like a blog, message board, calendar, shopping cart, wiki... It is a principal goal of Baldrick that modules from different authors can be combined together into a single Site.
A user will typically log in once to a Baldrick Site and use several of the modules (the message board, the blog, etc.) without having to re-authenticate.
A Site is defined by the master configuration file, typically baldrick.cfg. Another installation of Baldrick using a substantially different config file, even if on the same domain, wouldn't be considered part of the same Site.
The PathMap section of the configuration file defines Modules.
When a new Module is added to an existing Site, a PathMap entry and a Module Definition are added to the master configuration file. If that module has configuration options, they will typically be stored in another configuration file - which may or may not be in the same directory as the master configuration file.
[edit] Example
A baldrick.cfg file includes settings for the Site as a whole:
<SessionManager default>
....
<UserClass myusers>
....
and definitions for modules:
<PathMap> # link URLs to Module definitions /bin/myblog = BlogModule /bin/shop = ShoppingCartModule /bin/admin/users = UserAdminModule </PathMap>
<Module BlogModule>
handler-class = MyBlogHandler # perl module
</Module>
<Module ShoppingCartModule>
handler-class = FredCart::ShopHandler # a 3rd-party module
</Module>
