[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: What's up?



Hello all,
	My name is Matthew Patton, and I am a developer for
DiscipleMakers, a non-profit Christian Campus Ministry.  We just finished
work on a Conference Registration system that enables students and staff
to register online and manages some relatively complex logistics for
housing and managing payments.  Like Chris, in writing this system I
realized that simple 1-tier or 2-tier approaches would make for overly
verbose and hard-to-maintain code, where the program would depend heavily
on knowledge of the SQL schema.  Since I couldn't find any satisfactory
n-tier frameworks for PHP, I wrote my own (http://doulos.sourceforge.net),
and the registration system is now running on this open source (GPL) tool.
	However, as I consider my framework and the application I have
written on it, thanks to some things that Chris pointed out, I now realize
that I still haven't achieved the level of abstraction that I want.
Knowledge of the structure of the Database and SQL still permeates every
level of the code instead of being relegated to a single layer.
	I considered switching to GNUe, but hesitated because of the
amount of work necessary to make the project usable.  In my searching, I
came across Apple's WebObjects (http://www.apple.com/webobjects/).  Its
proprietary, so actually using it as a tool is out, but I read through
their docs for the Enterprise Object Framework (EOF,
http://developer.apple.com/documentation/WebObjects/Enterprise_Objects/index.html)
and was thorougly impressed.  I gleaned a great deal of insight into how
one designs a well-abstracted framework that separates how the data is
used (the objects) from how the data is stored (the rows in the relational
DB).  It is the best, most well-designed Enterprise Object Framework (or
Object/Relational Mapper) that I have seen.
	I considered porting a simplied version of WebObjects' EOF to PHP,
but in the process realized one of PHP's weaknesses: it is intended to run
as one-time scripts that service an HTTP request, spit out HTML, and die.
Contrast this with WebObjects, which assumes a "servlet" approach, where a
servlet that is constantly running behind Apache takes requests, does DB
operations, and returns HTML.  Realizing that a port of WebObjects to PHP
would be hindered by its design assumption that it is running on a
servlet, I considered switching languages to Python.
	I was very pleased to discover that there is already an Open
Source (GPL) port of WebObjects' EOF to Python, called Modeling.
(http://modeling.sourceforge.net)  It doesn't have all of the fancy
features that Apple's EOF has, but it has many of them and is nevertheless
in a very usable state (several production apps have been written in it),
and it seems well-maintained and well-documented  (caveat: it really helps
to have read Apple's docs before reading Modeling's docs).
	We are now considering using Modeling as a tool for writing clean,
well-abstracted, n-tier applications in Python.  This enterprise object
framework, when used in conjunction with Zope (www.zope.org) for handling
the servlet aspects (sessions, html templating), should meet our needs.
Our current project is a new receipting system for DiscipleMakers, which
we will be releasing Open Source.  I'll let you know our progress!  Thanks
for reading this long story.

					Matt

______________________________________________________________
Matthew Patton                                  pattonm@dm.org
DiscipleMakers Headquarters: (814)234-7975 x32



Reply to: