Re: [pear-webmaster] Object oriented design for the backend
| From: | Daniel Convissor | Date: | Fri, 18 Jun 2004 16:59:59 +0000 |
| Subject: | Re: [pear-webmaster] Object oriented design for the backend | ||
| References: | 1 | Groups: | php.pear.webmaster |
| Request: | Send a blank email to pear-webmaster+get-2595@lists.php.net to get a copy of this message | ||
Hi Martin:
On Thu, Jun 17, 2004 at 07:18:03PM +0200, Martin Jansen wrote:
>
> http://divbyzero.net/junk/pearweb-uml.gif
Here's my cursory review.
user
----
How about adding timezone and pronunciation columns.
package
-------
Why have the deprecated bool column when that status can be obtained from
the deprecated_since column containing a value?
category
--------
Should an info() method be included?
maintainer
----------
Needs fields
In general...
I'd encourage column names for a given key be the same in all tables for
ease of comprehension and joining. For example, package.id joins to
maintains.package. Ideally, the column would be named "packageid" in both
tables.
Performance can be enhanced a smidgen in the following ways:
* have as many tables as possible use only fixed width columns (char
instead of varchar)
* using DEFAULT <value> NOT NULL in most cases.
Regarding DataObjects, I haven't used it, so I can't fully say. But, from
my naive impressions of it, the notion of abstracting the schema and
having things automatically done makes me uncomfortable. I like writing
SQL straight out.
So, I guess it depends on how far you're thinking of abstracting the
thing. The idea of putting the database interactions into methods such as
add(), remove(), etc, that makes sense to me. But that's already being
done. Can you elaborate a little bit on what you're thinking?
I guess the real question is, what are the problems with the current
database schema and classes and the goals of the improvements?
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409