473,378 Members | 1,351 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Design issue with O/R mapping

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 fucked. 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


Jul 21 '05 #1
1 1303
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

"Flare" <no**@at.all> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
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 fucked. 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

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mcstock | last post by:
before i begin to roll my own, can anybody recommend a web-based application design & tracking tool that provides: functional hierarchy/network definition work break-down structures module...
5
by: Coder-X | last post by:
Hi, i have a few questions i would like to ask : 1 - Where can i find good design patterns resources for .NET ? 2 - What's the best design pattern for a windows database application (...
1
by: Flare | last post by:
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...
7
by: NOSPAM | last post by:
I am designing a web application in asp.net C#, and I created classes (in ..cs files) working with the .aspx pages. Now, for database part.... wondering which way is better: 1. put database...
0
by: Edward Gregor | last post by:
Hi! I hope this is the right place to post, I considered posting it to comp.programming, but I think my question is very C specific. But if this is the wrong place just tell me. thanks! Im...
1
by: VK | last post by:
Chris Tomlinson wrote: > I wonder, do you know of any converters either available now or in > development, that will take current HTML code, and convert (find & replace > basically) the...
22
by: Krivenok Dmitry | last post by:
Hello All! I am trying to implement my own Design Patterns Library. I have read the following documentation about Observer Pattern: 1) Design Patterns by GoF Classic description of Observer....
3
by: John S | last post by:
I've got to produce a console app that requests a dataset from a web service in our personnel system, manipulates the data and then updates each record in the Active directory. Not being the...
2
by: Brendon Towle | last post by:
I need to simulate scenarios like the following: "You have a deck of 3 orange cards, 5 yellow cards, and 2 blue cards. You draw a card, replace it, and repeat N times." So, I wrote the...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.