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

DataSet vs Custom Collection

We are designing a WinForm application ( three tiered)
There is a debate in our group as to whether we should pass datasets or
our custom collections from business layer to the user interface layer.
The data is stored in memory (fetched from DB only once). The
collection is dynamic in the sense that it can change.
My personal opinion is that using dataset makes you code take much more
memory than a custom collection. Datasets have overheads that you may
not want (or get) if u use your custom collections.
Am I right? Can someone throw some light on this topic

Nov 19 '05 #1
3 2217
Hi,

This is a question that comes up alot. I can't tell you how often I see
people over design an application and introduce totally uncessary
complexity. Because I don't have the specifics on your application, I
am going to assume that you are not building something that is going to
lift the space shuttle. Having said that, I have written applications
that do both and are termed "big applications". Since you are working
in a WinForms application, I definitely say go with the DataSet because
you will have the processing power of the client at your fingertips.
The DataSet has allot of cool functionality that you are going to have
to reinvent as the application grows. If you are really leaning toward
collections, I would still suggest you start with the DataSet and hide
it behind an interface so you can swap it with a collection if you have
to.

To that end, are you building a smart client application? If so, then
the DataSet is even better because it offers the facility to read and
write to XML (as you probably already know) to support offline
capabilities. Anyway, people always bring up the size and possible
performance issues with DataSets and it scares people into not using it
because they think their application has to perform. I say use the
DataSet but combine it with the Caching Application Block if you are
concerned with performance; although I have never seen a problem with
it.

Thanks,

Sayed Y. Hashimi

http://www.sayedhashimi.com
Shameless Book Plug: Service-Oriented Smart Clients with .NET 2.0
http://www.amazon.com/exec/obidos/tg...glance&s=books

Nov 19 '05 #2
"JimGreen" <ji*********@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
We are designing a WinForm application ( three tiered)
There is a debate in our group as to whether we should pass datasets or
our custom collections from business layer to the user interface layer.
The data is stored in memory (fetched from DB only once). The
collection is dynamic in the sense that it can change.
My personal opinion is that using dataset makes you code take much more
memory than a custom collection. Datasets have overheads that you may
not want (or get) if u use your custom collections.
Am I right? Can someone throw some light on this topic


There are indeed performance differences between DataSets and custom
collections. But these differences are not so large or simple that
performance can be used as a valid design criterion based on the information
you have provided. Memory usage is usually similar, serialization is
cheaper for custom objects (at least until .NET 2.0), indexing, searching,
filtering and data binding is cheaper with DataSets.

There are design tradeoffs related to DataSets and ease-of-use tradeoffs
related to DataSets. These are the issues which should drive design
desitions. The performance tradeoffs are usually just a tie-breaker.

David
Nov 19 '05 #3
you can fine tune datasets even typed ones to certain degre. in a winforms
application i agree with you, implementing IBindingList and other issues are
not easy to implement, but with a web application i suggest inheriting your
base collection to collectionbase and add common functionalty to it and then
inherit from that collection for each entity and add custom behaviour, maybe
database read operations to that strongly typed collection.
Nov 19 '05 #4

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

Similar topics

0
by: Patrick Kearney | last post by:
Hi All, I have seen this type of question raised in various groups but no one has supplied a definitive answer. I am trying to load a dataset schema that has an xs:include. Project policy is to...
6
by: Boaz Ben-Porat | last post by:
I heard somewhere that the DataGrid class is implemented as a XML graph in memory. Is this true ? TIA Boaz Ben-Porat DataPharm a/s Denmark
0
by: Craig | last post by:
Does anyone know whether you can take a dataset and serialise into a custom collection? Over the past couple of months I've been retreiving my datasets and manually iterating them to create my...
3
by: Ben Becker | last post by:
I am trying to build a custom crosstab type of grid where I take some items in a data grid and based on the content of the current item compared to the previous item, determine if a new row in a...
4
by: _DS | last post by:
I need to create arrays of a custom data type (which is composed of various strings, ints, the usual). The original was built using CollectionBase. I was thinking about redesigning to use...
6
by: npaulus | last post by:
Hi, DataSets are usually resource heavy. Instead of having to pass them from my middle tier to my presentation layer I was wondering if anyone has developed a custom collection object that is...
2
by: Emma Burrows | last post by:
I have created a typed dataset in .Net 2.0 based on an Access database, and set up various methods to retrieve specific data from the tables, etc (great fun). However, I need to implement a custom...
13
by: Maxwell2006 | last post by:
Hi, We are having a debate over using DataSet as return value type for web services. The problem is that we don't know whether Java applications can use DataSet
5
by: Simon Woods | last post by:
Hi Does anyone know if there any dotnet software out there which converts a dataset into a collection of custom objects, programmatically i.e. actually creates the class structure and collection...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.