Displaying 1 result from an estimated 1 matches for "ldapperson".
Did you mean:
ldap_person
2006 Mar 30
0
design question - user data from two different sources
...ions that they would be
responding to and the application can ignore where the data is pulled
from.
so what would be an elegant way of achieving this? I would appreciate a
suggestion of some pattern of organising these models. What I''ve come up
with so far are 3 classes - DbPerson and LDAPPerson, and a Person class
which is supposed to be something like an interface. It has an if clause
that checks the USE_LDAP constant. Depending on this test it sets a
@my_class variable. Then it defines wrappers to all the common functions
of the two models and calls the methods of the relevant model...