473,387 Members | 1,548 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,387 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


Nov 18 '05 #1
1 1204
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

Nov 18 '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...
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...
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 (...
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...
6
by: Peter Richardson | last post by:
Hi, I'm wondering if someone can help me with some design questions I have. I'm trying to create a class in C# to represent my customers. I know how to create teh Customer class and all, but my...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.