[cgiapp] [announce] OO MVC jumpstart/starter application

Mark Rajcok mrajcok at gmail.com
Wed Dec 3 23:52:55 EST 2008


I'm looking for feedback on a small working "core" of an application and
tutorial that I recently wrote.
The tutorial is here:
http://docs.google.com/View?docID=dd363fg9_77gb4hdh7b&revision=_latest
The code is on sourceforge: http://perlmvccgiapp.sourceforge.net/
as is a working demo (don't expect much):
http://perlmvccgiapp.sourceforge.net/cgi-bin/app1/main.cgi

The document discusses how I used CGI::Application and its associated Plugin
modules to create a reusable MVC (Model-View-Controller) object-oriented
"starter" application that is suitable for a CGI environment.  It includes:

- user authentication and management: create account, edit account, sign in,
sign out, forgot password
- session management, including expiry
- page redirection
- data/form validation
- simple (error) logging
- status message facility
- HTML templates
- clean MFC separation, including a base class for database model classes
and a singleton for sharing the $dbh
- a suggested directory layout
- a "comparison" table to Titanium

It uses a MySQL backend.

I try to present everything that someone new to CGI::App will need: Perl
code, SQL statements, database table structures, module install script,
session expiry script, config file, CSS file, etc. -- 20+ files in all. I
also discuss each feature a bit (and why you'll need it) as well as some MVC
concepts and OO design principles along the way.

I am particularly interested to know if you think
- the level of detail is sufficient
- the base set of functionality would be useful to most projects
- what features you think are missing (but note that I'm targeting the most
popular/needed features) -- this is of course subjective.  I also don't want
the tutorial to get too much larger!

The goal of the project is to give people a working app that they can
imemdiately play with and extend, and has good documentation.
-- Mark


More information about the cgiapp mailing list