This site is built around a framework of my own design. I wanted to explore a number of ideas I'd had over the years that I couldn't pursue at my day job.
I wanted to be sure I did these things:
- Produce an object-oriented framework built from loosely coupled components.
- Give applications a means of communicating with each other.
- Make sure everything had the same look and feel.
- Perform common tasks very easily.
- Conduct all business logic BEFORE any display logic.
- Conduct all display logic before actually displaying anything.
I wanted to NOT do the following:
- Write the same code over and over again, even if there were slight variations in the code from instance to instance.
- Box myself into one mode of output or one layout in the final ouput.
- Have more than one file where HTML (or anything else) is output.
So, I devised these Framework Goals and Principles:
- Firmly separate display logic from business logic.
- All the boring, repetitive tasks get hidden away in component library files.
Things like outputting HTML, laying out forms, validating data, connecting
to a database and processing queries, displaying error messages to users,
logging things in log files, those should all be hidden away in libraries
to the greatest degree possible.
- Nothing in said library files should be application specific. The library
files should work equally well for any html-form-based application.
- Applications should produce distinct HTML fragments that can be arranged in
any order on the page without producing invalid HTML.
- Applications should all have the same, basic behavior: a) initialize,
b) process business logic, c) prepare results for display. In that order, every time.
- Application classes should employ introspection to build lists of properties
to display in HTML forms, to validate in POST, and to build sql statements
with field names and values, and any other operations they need to perform that would benefit from such optimization.
I've adhered to those principles in building this site and the result speaks for itself.