[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proposed Architecture Changes in 2.0 (Request for comments)
- Subject: Proposed Architecture Changes in 2.0 (Request for comments)
- From: Chris Travers <..hidden..>
- Date: Sat, 6 Mar 2010 15:25:00 -0800
Hi all;
Looking forward from 1.3, I am going to propose the following framework changes.
I think in general, the 1.3 framework is better than the 1.2 framework
in terms of understandable, testable code. Unfortunately the
framework isn't perfect and will run into a few issues on mod_perl,
coding styles, etc. Also there are a few areas of the 1.3 codebase
that need to be clearly refactored going forward.
1) Modules should be broken off into modules where objects have
consistent, documented structures. The 1.3 Company/Person logic needs
to be redesigned to work along these lines.
2) Each object needs to have a corresponding and documented "flat
representation" used in HTML forms, HTTP posts etc.
3) Each database-based object should have a number of different
constructors including one from a "flat representation," one that
copies internal representation elements passed in the arg string, and
one which retrieves from the database via the appropriate keys.
4) The user object will be globally available in the script (yes,
this is safe with mod_perl and multithreaded MPM's) and will have
roles, locales, etc. as well as the database connection.
5) The UI template rendering will be handled outside of the workflow
script. Also prior to exiting db connections, etc. will be closed,
and the user object destroyed.
6) Workflow scripts will allow stacks of coderefs to be pushed onto
before, instead, and after piles, allowing for shims to be placed by
system integrators at these points.
I hope to have a rough proof of concept shortly after 1.3 ships for
further review
Best Wishes,
Chris Travers