PC Review


Reply
Thread Tools Rate Thread

DataSet vs. Collection of Objects

 
 
Brad
Guest
Posts: n/a
 
      14th Feb 2007
I have an application that is highly CRUD-centric for data management with
some more sophisticated reporting behavior. I'm trying to decide between
using strongly typed datasets vs. collections of objects. I want to
decouple the business logic and UI from the persistent storage so that the
impact on changing the database doesn't ripple upwards. At first blush it
appears that the dataset approach forces some coupling. Would somebody
please comment on this.

Thanks in advance.

Brad


 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      14th Feb 2007

Its only coupled if you use the magic/built in / voo doo populaters.

YOu can use either strong datasets or business objects as the glue between
layers.


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

6/5/2006
Custom Objects and Tiered Development II // 2.0


I have dataset code there also, ( in the 1.1 version from may ) ....

but it shows how to use/populate datasets without the voodoo.

And a reference to read from start to finish, aka, very informative for a
bird's eye view:
*
http://msdn.microsoft.com/library/de...tml/BOAGag.asp


REad the section
Deploying Business Entities

very carefully




"Brad" <(E-Mail Removed)> wrote in message
news:eL$(E-Mail Removed)...
> I have an application that is highly CRUD-centric for data management with
> some more sophisticated reporting behavior. I'm trying to decide between
> using strongly typed datasets vs. collections of objects. I want to
> decouple the business logic and UI from the persistent storage so that the
> impact on changing the database doesn't ripple upwards. At first blush it
> appears that the dataset approach forces some coupling. Would somebody
> please comment on this.
>
> Thanks in advance.
>
> Brad
>
>



 
Reply With Quote
 
RobinS
Guest
Posts: n/a
 
      16th Feb 2007
This is the methodology that I use. It takes a little bit more trouble, but
it seems very clean to me. If I need to change my data source, I can
change my data layer. If my field names change, I can change the locations
where the business object fields are retrieved from and stored to the
dataset, and not have to change any of my UI unless I want to.

I'm assuming you've checked out Rocky Lhotka's book. For a more pragmatic
and applied approach, Deborah Kurata has just come out with a new book
called "Doing Objects in VB2005" that gives an example of how to create a
3-layer application. I know it's in VB, but you could figure it out. It has
some neat stuff about how to use code snippets and stuff like that, too.

Robin S.
----------------------------
"Brad" <(E-Mail Removed)> wrote in message
news:eL$(E-Mail Removed)...
>I have an application that is highly CRUD-centric for data management with
>some more sophisticated reporting behavior. I'm trying to decide between
>using strongly typed datasets vs. collections of objects. I want to
>decouple the business logic and UI from the persistent storage so that the
>impact on changing the database doesn't ripple upwards. At first blush it
>appears that the dataset approach forces some coupling. Would somebody
>please comment on this.
>
> Thanks in advance.
>
> Brad
>



 
Reply With Quote
 
pfc_sadr@hotmail.com
Guest
Posts: n/a
 
      16th Feb 2007
datasets are crap

datareaders rock; but connections suck

in good old classic ADO you could decouple the relationship between
the data layer and objects

ADO.net is 'unnecessary change'



On Feb 14, 2:15 pm, "Brad" <brad.markis...@roche.com> wrote:
> I have an application that is highly CRUD-centric for data management with
> some more sophisticated reporting behavior. I'm trying to decide between
> using strongly typed datasets vs. collections of objects. I want to
> decouple the business logic and UI from the persistent storage so that the
> impact on changing the database doesn't ripple upwards. At first blush it
> appears that the dataset approach forces some coupling. Would somebody
> please comment on this.
>
> Thanks in advance.
>
> Brad



 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      16th Feb 2007
(E-Mail Removed) wrote:
> datasets are crap


Then don't use them. I don't.

> datareaders rock; but connections suck


Hm... I don't really see what you could use a an alternative to a
database connection?

If you mean that having to keep a connection open until you have used
all data, you don't have to. Just read the data, close the connection
and then use the data.

> in good old classic ADO you could decouple the relationship between
> the data layer and objects


....Effectively turning the Recordset object into something that more
resembles a DataTable object than a DataReader object.

> ADO.net is 'unnecessary change'


Maybe not necessary, but I think that it's a good change. I really like
the datareader.

>
> On Feb 14, 2:15 pm, "Brad" <brad.markis...@roche.com> wrote:
>> I have an application that is highly CRUD-centric for data management with
>> some more sophisticated reporting behavior. I'm trying to decide between
>> using strongly typed datasets vs. collections of objects. I want to
>> decouple the business logic and UI from the persistent storage so that the
>> impact on changing the database doesn't ripple upwards. At first blush it
>> appears that the dataset approach forces some coupling. Would somebody
>> please comment on this.
>>
>> Thanks in advance.
>>
>> Brad

>
>



--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
Posts: n/a
 
      27th Feb 2007
Brad wrote:
> I have an application that is highly CRUD-centric for data management with
> some more sophisticated reporting behavior. I'm trying to decide between
> using strongly typed datasets vs. collections of objects. I want to
> decouple the business logic and UI from the persistent storage so that the
> impact on changing the database doesn't ripple upwards. At first blush it
> appears that the dataset approach forces some coupling. Would somebody
> please comment on this.


There are quite a bit of personal taste in that choice.

From a very purist point of view I think that the collection
of objects is more decoupled from the data origin than a
typed dataset. And it comes with less out of the box functionality
that you may not want to expose.

For a large project I would definitely prefer the collection
of objects.

For a small project I may like the out of the box capability
of the dataset.

But it is close to be question like how many places to indent
or how to place the curly brackets.

I like what I have described, but if you (or more precisely: the
place where you work) prefer the dataset, then that is it.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return collection interfaces or collection objects??? Veloz Microsoft C# .NET 2 24th Sep 2007 06:59 PM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen Microsoft Dot NET 1 18th May 2007 10:24 AM
A collection of Objects? RSH Microsoft C# .NET 5 15th Dec 2005 10:01 PM
Objects new in Collection aa7im Microsoft C# .NET 10 7th Dec 2004 06:49 PM
Collection Objects Dufus Microsoft ASP .NET 1 13th Nov 2004 12:37 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:13 PM.