RE: [PEAR-DEV] Separating business logic from data store logic
| From: | Lukas Smith | Date: | Sat, 08 Nov 2003 08:10:31 +0000 |
| Subject: | RE: [PEAR-DEV] Separating business logic from data store logic | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23345@lists.php.net to get a copy of this message | ||
Generally I feel that we all know that we have two choices:
1) focus on runtime speed
2) focus on development speed
I tend to focus on 2).
For all that are in a similar situation:
There is a huge task ahead of us to create a set of classes that interact in
PEAR.
My core idea is the following:
Phase I)
Unify all configurations in one XML file.
This XML file focuses on structuring the data and defining relations among
each other.
This is what I am trying to achieve with DB_Schema.
The result be a basic framework which will assist in transforming the
structure out of any datasource into a structure for another datasource.
This will be a key first step in bringing the various classes that we have
in PEAR together.
It will allow the creation of DB schemas. It will allow the generation of
configuration files for DataObject. It will allow the creation of conf files
for a forms and validation class etc.
The result will be fairly nice for a start.
Phase II)
From this we can build to further integrate each of the various classes.
The idea will be that the configuration files become more and more similar.
That functionality is not duplicated needlessly.
--------
Further comments
In the end we will have a single XML file which will control our business
logic. Of course we will probably want to serialize into a format that is
readable more quickly at runtime. Or we can load the configurations into
shared memory etc. So performance should not be our probably on that level.
Of course we will have quite a number of object interacting so I am not
claiming we will set new performance standards. But the result should be
quite fast (especially with PHP5 which is lurking around the corner).
The best thing about this approach is that in Phase I) all the efforts in
PEAR can be brought together without a huge integration effort. All that
people will need to write are DB_Schema readers and writers and that's it.
Once we have that running we are already half way there but we can already
start seeing the benefits. This should give enough incentive for Phase II).
The other advantage of Phase I) is that it will open up choice. It will be
possible to move from one component to another or even running multiple
different components for one job in parallel (like quickforms and
ooh_forms).
Anyways I have seen so many posts on the list on this topic. I know that I
am working on this. But I also know that I have loads of other stuff to do,
so any help would be appreciated. Also my plans for DB_Schema are now pretty
grand .. much greater than I planned originally.
Regards,
Lukas