Re: DataObjects for ldap
| From: | Alan Knowles | Date: | Tue, 12 Nov 2002 01:44:31 +0000 |
| Subject: | Re: DataObjects for ldap | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-10710@lists.php.net to get a copy of this message | ||
Chrigu wrote:
Hi! I would like to port the curent DataObjects to an ldap backend (ex. DB_DataObjects_ldap), as it has been done with DB_ldap. But I'm not yet sure how to do this: a) Should I keep the same API as in the SQL DateObjects for compatibility reasons. b) Change the API to a directory db based one, sure it would look similar. c) like b) but with somme alias methodes like those in the current DataObjects which refers to the ldap specific ones. d) all of the above is waste and you have a better solution ;-) I personally prefer variant b) because in ldap you don't have rows, tables and furthermore the data manipulation operators have diffrent names (not select, insert etc.).b) would make sense - using insert/update etc. really is specific to SQL.. - it make sense to use more 'ldap'y method names - The principle of using extended dataobjects for storing data specific methods, is really the core design logic.. You can always build a wrapper class that aliased the ldap methods to the 'sql'y ones (and visa versa), but I suspect most of the time you would use one or the other, not mix or change that much... The only other kind of standard that dataobject uses is the idea of 'staticMethod' - where the keyword static is prefixed to any static methods.. - its not currently a pear standard, but it does make the code easier to read (at the cost of a little extra typing) Regards Alan
what are you thinking? regards Chrigu