Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Design issue with O/R mapping

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Flare - 26 Sep 2004 19:18 GMT
Hi.

Im have asked for recommendation regarding the best production ready O/R
mapping tools for .net. I got that.

Since im an old, ok maybe not old (only 27), Java programmer patterns and
developement with tiers is of great importance for me.

I have a problem with the famours anti-pattern Tier leakage. In the Java
world I used POJO?s (simple java classes) as value objects. These value
objects was used for cayrring data between the tiers. So if i changed the
persistence tier the rest of the code still relyed in the same POJO?s.

Now with the .net O/R they all genereate eg. EmployeeEntity wich inherit
from EntityBase2 (LLBL PRO). If I pass the object from my persistence layer
to the business layer and down to the view I have just made a seriuos
"maintaince bug" the "tier leakage". If i wanna use eg. the EntityBroker im
so to say f.cked. I have to refactor ALL and EVERY class witch depend on the
EmployeEntity.

Have anyone thougt about this and come up with an solution? Is the
persistence tools wich can map PURE c# classes to realtionel classes as the
Java Hibernate? And why have so few chosen this way of doing it?

Is it hard to map eg.

Customer c = new Customer();
// fill object

adapter.SaveEntity(c);

And go find what this Customer really maps to int the Database?

Anders Jacobsen
Nick Malik - 27 Sep 2004 14:40 GMT
Hi Anders,

You are not the only one.  If I'm going to move data from the DAL, through
the BL, to the UI layer, I usually use a simple data object.  I may map
between multiple objects (depending on the complexity of what I'm doing).  I
agree that one excellent way to reduce dependencies is to sever the coupling
that comes when you pass objects in the way you suggest.

I haven't looked at Object - Relational mapping tools for that very reason.
Personally, I haven't seen enough reason to bother with them, because they
usually don't add message passing to their structure (e.g. passing simple,
serializable, classes from one layer to another to represent a message).  If
you ever see any of my posts or articles, you would see that I am a
proponent of message-based architectures, and I admit that his bias creeps
into my designs within a component as well.

While I cannot help you choose between the commercial tools available,
perhaps it will help to know that you are not alone in your concerns about
their utility.

--- Nick

> Hi.
>
[quoted text clipped - 30 lines]
>
> Anders Jacobsen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.