On 25/ott/06, at 13:38:04, Simon R Jones wrote:
I understand Stefan's point on extending PHP classes, though I
don't see
that DB mapping requires the complexity of PHP. It may be neater to
use a
format such as XML or YAML to achieve this. I see the point of auto-
complete
but unless I've missed something that doesn't work when you use a
factory to
generate a class object since there is no direct link with the
class name
and object variable. And I would assume a DB class would use the
factory
method to instantiate such an object?
This is suboptimal for production because you insert yet another
layer (parsing)
impacting on performance. You'd better have a generator divided in
two parts.
One to read database schema and one to output it, so the second can
be made
to output php code or xml plus php code to parse it.
Federico