Re: Contributing / DB_Object

From: Date: Mon, 29 Apr 2002 15:10:34 +0000
Subject: Re: Contributing / DB_Object
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5889@lists.php.net to get a copy of this message
you may want to look at http://www.akbkhome.com/Projects/db_oo+-+an+object+based+Sql+builder+and+wrapper+for+peardb/usage.html I'm still trying to get more docs up, but this design is more object based, most of the methods take no arguments, and usually no more than two are in the core class.. IMO the design you had is not really taking much advantage of class/objects, rather just wrapping functions in classes.. (but I'm no expert :) regards alan fabien.marty@free.fr wrote:
(Hans)
Isn't much of what you describe already in DB_storage?
sorry for this late response but i had a webmail crah :-( I did'nt know DB_storage (I think it's surprising to put it with mysql and pgsql... backends). But you are right : the main idea is the same. Yet, there are differences. I think that DB_Object is more easy to use, particulary if you want to load several objects of the same class (DB_Object::multipleLoad()). Moreover, with DB_storage, you have to use its set() method to change the value of an object property... Maybe DB_Object is more flexible ??? But, with DB_storage it's better encapsulated. But, if the main idea is the same, i think that's the two ways don't exclude themselves. Yet, as i am not a 'PHP GURU', I will repect any opposite opinion. Fabien (fabien.marty@free.fr) NB : The source code of DB_Object is available at : http://www.esub2.com/DB_Object.php.txt


« previous php.pear.dev (#5889) next »