473,388 Members | 1,480 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,388 software developers and data experts.

Design question: transferring data between business objects and the data layer

Hi all,

What is, in general, the preferred practice to transfer data between
business objects and the data layer? To be more specific, I have a
couple of business objects with state data that are stored in external
storage. The data layer take care of communicating with the storage and
return data in dataset or file stream or simple arrays. Have the
business objects directly consume a dataset seems inflexible. What
would be the prefered way of handling this most common situation?

To take this discussion further, let say that the current requirments
only requires data to come from a single source. But it is clear that
different data sources will be needed down the road. Would this extra
consideration impact your design? If so, how?

Thanks for all the suggestion and discussion in advance.

Oct 31 '06 #1
3 1885

olduncleamos wrote:
Hi all,

What is, in general, the preferred practice to transfer data between
business objects and the data layer? To be more specific, I have a
couple of business objects with state data that are stored in external
storage. The data layer take care of communicating with the storage and
return data in dataset or file stream or simple arrays. Have the
business objects directly consume a dataset seems inflexible. What
would be the prefered way of handling this most common situation?

To take this discussion further, let say that the current requirments
only requires data to come from a single source. But it is clear that
different data sources will be needed down the road. Would this extra
consideration impact your design? If so, how?

Thanks for all the suggestion and discussion in advance.
Lately, I've been playing with NHibernate for this sort of thing.

www.hibernate.org

--
Tom Shelton

Oct 31 '06 #2
Hello olduncleamos,

oWhat is, in general, the preferred practice to transfer data between
obusiness objects and the data layer? To be more specific, I have a
ocouple of business objects with state data that are stored in
oexternal storage. The data layer take care of communicating with the
ostorage and return data in dataset or file stream or simple arrays.

oHave the business objects directly consume a dataset seems
oinflexible. What would be the prefered way of handling this most
ocommon situation?

Everything depends on your requirements - if they are always (that usually
ends up they are not in some time later) will be physically nearby there
is no bad to consume DL directly. And it's not the problem to distribute
them later with using WS/COM+/.NET Remoting, the problem is the interface
for the communication - your all data communications should be performed
through well-known (read published) contract (read interfaces)
oTo take this discussion further, let say that the current requirments
oonly requires data to come from a single source. But it is clear that
odifferent data sources will be needed down the road. Would this extra
oconsideration impact your design? If so, how?

You can create DL Factory class that will be used by BL and will responsible
for creating specific DL objects to do some kind of job or your can incapsulate
your data sources in interfaces - look at the DataBase providers architecture,
your just have the set of interfaces and your are free to know which DB (oracle,
sql) u are using
---
WBR,
Michael Nemtsev :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Oct 31 '06 #3


See
http://sholliday.spaces.live.com/blog/

5/24/2006 Entry
Custom Objects/Collections and Tiered Development
"olduncleamos" <ol**********@yahoo.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi all,

What is, in general, the preferred practice to transfer data between
business objects and the data layer? To be more specific, I have a
couple of business objects with state data that are stored in external
storage. The data layer take care of communicating with the storage and
return data in dataset or file stream or simple arrays. Have the
business objects directly consume a dataset seems inflexible. What
would be the prefered way of handling this most common situation?

To take this discussion further, let say that the current requirments
only requires data to come from a single source. But it is clear that
different data sources will be needed down the road. Would this extra
consideration impact your design? If so, how?

Thanks for all the suggestion and discussion in advance.

Oct 31 '06 #4

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

Similar topics

22
by: Nunaya | last post by:
We have developed two objects called "customer" and "salesrep". For simplicity, assume that these two objects will talk directly to a database. The database has three tables: customers,...
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
50
by: Jay Balapa | last post by:
Hello, Currently my application has three tiers- 1. Presentation Layer (Asp.Net / Win Forms/ Pocket PC UI.) This predominantly contains User Controls, Custom Controls and Win/Web Forms. I...
2
by: shan chennai | last post by:
hi... i have a design as follows... Presentation Layer (.aspx, .cs) -- Service Layer (just a facade) -- Business Layer (business objects) -- Data Layer (all DB related things for business...
6
by: rodchar | last post by:
Hey all, I'm trying to understand Master/Detail concepts in VB.NET. If I do a data adapter fill for both customer and orders from Northwind where should that dataset live? What client is...
3
by: CSharpguy | last post by:
I have a 03 .NET web that does not use Typed DataSets, it uses a Busines Layer/DataLayer classes. Alot of my reading on .NET 05 is using the DataSets for the datalayer/business layer. I have a 05...
2
by: groups.james | last post by:
I have basically inherited an old classic ASP 3.0 application. Overall it's design was a n-tier design (not always adhered to...) VB6 COM objects for the Business Layer - hosted in COM+ VB6 COM...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
29
by: Brad Pears | last post by:
Here is a simple OO design question... I have a Contract class. The user can either save an existing contract or they start off fresh with a blank contract, fill in the data and then save a...
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: 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: 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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.