Re: new package DB_Abstract/Easy/DataBuilder/DataGette r/?

From: Date: Wed, 15 Jan 2003 22:22:11 +0000
Subject: Re: new package DB_Abstract/Easy/DataBuilder/DataGette r/?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-12515@lists.php.net to get a copy of this message
DB_QueryBuilder or something along those lines (except i miss the point of what your package does :))) Or the DataBuilder you proposed.
I would go with QueryBuilder or QueryTool, at basically all the stuff you describe below is really enhancing the query building (by validating etc.)..
I'm not sure DB_OOLayer really explain clearly that this builds Query (and executes them), with some checking on the Query. The fact it is an object, really has very little to do with the purpose of the class. where as dataobjects was design as an data object modeling tool, above the SQL building. It's quite interesting the overlap in the two classes.. - And It's probably worth illustrating that one is focused on query building, where the other is focused on dataobject building. As I said on IRC, some of the profiling I did illustrated that using getters & setters are very expensive in terms of performance, (and I discovered recently it is not really how PHP was designed.. it's more of a C# type language where public setting of variables is intended to be wrapped by overload variable setters/getters, rather than pre-refactoring designing them..) .. until we have code optimizers that know about this... which is also why the use of PEAR::staticGetProperty() is being phased out (except initial config), and ->debug() calls are wrapped in if($GLOBALS['_DB_DATAOBJECT']['PRODUCTION']) .... I know it may be a pain... but it might be worth considering following some of the existing method names in dataobjects.. ->orderBy(), rather than setOrder().. etc. that way you can just copy and paste the docs from dataobjects.. some of the time... Regards Alan
well it is not only a query builder, it also validates some stuff before executing a query, like columnnames, column size for varchar and generates a warning if a string is too long, and some stuff i probably forgot to mention. but i am planning on adding advanced stuff like caching queries, may be optimizing them or as discussed with alan maybe split them db-dependent and optimize speed this way ... another thing i am planning is to provide an (standard Entity-Relationship describing) XML file which generates classes and might even create datagrid kind of thing. so that it may end up somewhere like DataObject aims to do too having an M$ Access kinda tool, or at least the package on which this can be done
-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com

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