Re: Data Layer Relationships



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

.



Relevant Pages

  • Re: Circular Referencing in C#
    ... A classic three-tiered design. ... business layer, never to the data layer. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Circular Referencing in C#
    ... > business layer, never to the data layer. ... three main frameworks that provide all the services necessary for completely ...
    (microsoft.public.dotnet.languages.csharp)
  • Same Old ObjectDataSource Problem
    ... the data layer, one for the business layer and one for the ... simple one on which I have an ObjectDataSource and Gridview to display ... but then the ObjectDataSource still invokes its ...
    (microsoft.public.dotnet.framework.aspnet)
  • LINQ- Compiled queries and data layers
    ... before LINQ we all used stored procedures ... We also used to have wrappers for stored procs in the data layer (now LINQ ... Opinions on the little business layer and data layer methods below ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: What do People do to avoid Tight Coupling?
    ... > The presentation layer is coupled to the business layer, ... > layer is coupled to the data layer. ... Actually I normally couple the presentation layer to the domain layer ...
    (microsoft.public.dotnet.languages.vb)

Loading