Baldrick Application Framework

From CunningPlans

(Redirected from Baldrick)
Jump to: navigation, search

Contents


The Baldrick Application Framework is a free and open-source library of Perl 5 modules to provide the functionality common to all non-trivial web applications: session management, URL-to-handler mapping, user loading, authentication and authorization, database connectivity and querying, and template-based output generation.

Baldrick is a set of libraries, not an application. It is a tool for programmers to use in building their own web applications (called Modules in a Baldrick setup).

Baldrick has been used to build a shopping cart, a membership-tracking application, and a message board. It could serve equally well as the foundation for a blog, a shared calendar application, a photo upload site, or any other web application that needs the features described above.

Baldrick is designed to allow Modules of functionality - message board, blog, etc. - to coexist within a single Site (an installation sharing a master config file, session manager and user login setup). Users on a site should be able to freely move between installed modules without re-authenticating, even if those modules were from different developers.

As of October 2007, it is ready for production use. Documentation is still very lacking, but I am willing to assist in any installation.

The Baldrick Application Framework may be freely distributed, used, and modified, under terms of the GNU Public License or the Perl Artistic License.

The name Baldrick is inspired by the BBC Television series Blackadder. No challenge to or dilution of BBC trademarks is intended; the name was chosen as a tribute to their fine work.

[edit] Inspiration

In 2004, I downloaded a popular PHP-based message board system, wanting to integrate it into an existing website for a club I belonged to. The existing site was in Perl, but I figured I could rewrite the authentication and authorisation sections of the PHP message board to use the same database and tables that I used in the Perl-based part of the site.

Sadly, I found that the message board - while beautiful and feature-rich - was a tangled mess of spaghetti code with no modularity, no encapsulation, no data hiding; calls to manipulate the user tables were scattered throughout almost every source file. I abandoned the plan, but it got me thinking that there should be some sort of pluggable authentication and authorisation system: something that would handle all the grotty details of user data storage and authentication, presenting it to the main program as a clean interface. Combining this idea with my existing session management classes formed the core of what would become Baldrick.

[edit] Goals

Main Article: Project Goals
  • to provide classes that handle the "boring" parts of web development, such as session management and user authentication.
  • provide the ability to easily incorporate third-party applications (Modules) into an existing Site.
  • adapt to many different methods of storing user and group data
  • be compatible with the methods of handling users and sessions in the author's previous work.

[edit] Compatibility and System Requirements

  • FreeBSD 5.x-6.x or Linux
  • Perl 5 (tested on 5.8)
  • Apache -- may work with other web servers but is untested
    • Apache mod_perl is optional but supported
  • Template Toolkit

[edit] Getting Baldrick

See Downloads and Installation for instructions on setting up your own Baldrick installation.

Baldrick was written by Matt Hucke between 2005 and 2007, and is an ongoing project.

Personal tools