Re: Data Layer Relationships
- From: Rick Elbers <rick@xxxxxxxxxx>
- Date: Fri, 15 Sep 2006 09:20:25 +0200
Guruk,
I dont even think you should crank out a business layer for AD that
way since voor LDAP all of them are objects. You need 1 LDAP wrapper,
which you probably could find somewhere on the internet.
One thing I think object orientation is learning us is to USE object
frameworks of other people and to build UPON those.
For the academic case( that it should be) that you want to know what a
few alternative solutions to your problem are:
- Return array of strings, let the ActiveDirectoryDomain construct
from that the activeDirectoryGroup.
- Create a loadall in ActiveDirectoryGroup_Data which receives the
domain ( as a string is enough), reach this directly from
ActiveDirectoryDomain or from ActiveDirectoryGroup.
- Just use static data and methods for the _Data objects. Then you
can reach those class level methods more easy.
Rick
Op 14 Sep 2006 12:12:30 -0700 schreef "Guruk"
<rwilson@xxxxxxxxxxxxxxx>:
Hello All,
I have a design question about the relationship between data layers
in a class structure. Continuing my previous example with
ActiveDirectoryDomain and ActiveDirectoryGroup classes, I was wondering
on the relationship (if any) that should be established between the
Data Layer classes? Here's a quick UML diagram of the structure...
1 *
[ActiveDirectoryDomain] ------------ [ActiveDirectoryGroup]
| |
| |
| |
[ActiveDirectoryDomain_Data] [ActiveDirectoryGroup_Data]
Now, of course the business layers of the 2 classes are related, but
should their data layers be related as well? For instance, should
ActiveDirectoryDomain_Data know about ActiveDirectoryGroup_Data? My
original thought was that it should not! I thought that all
communication between the 2 classes should happen on the business
layer, not the data layer. But then, I got to designing specific
methods within the data layer. One such method is
ActiveDirectoryDomain_Data.GetGroups(). This method is responsible for
querying the domain controller and returning all of the groups within
the domain. Now, do I just return an array of strings, or should I
return an array of ActiveDirectoryGroup objects? My OO instincts tell
me to return the array of Group objects, but then I would have to
introduce the relationship between the Domain_Data and Group_Data
classes?
Any suggestions or furture reading on Data Layer Relationships /
Dependencies would be very much appreciated.
Thank you all,
~ Guruk
.
- Follow-Ups:
- Re: Data Layer Relationships
- From: Guruk
- Re: Data Layer Relationships
- References:
- Data Layer Relationships
- From: Guruk
- Data Layer Relationships
- Prev by Date: Re: Static vs Non static
- Next by Date: Re: Static vs Non static
- Previous by thread: Data Layer Relationships
- Next by thread: Re: Data Layer Relationships
- Index(es):
Relevant Pages
|
Loading