473,406 Members | 2,356 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,406 software developers and data experts.

DataSet to a Custom Collection object

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 less resource heavy
and can be passed lightweight to the presentation layer.

Thanks,
NJ

Apr 21 '06 #1
6 5529
How are u going to bind your custom object to the controls in UI?
Using DataSet/DataTables or what? It that case why not to serizalize DataSet
binary to diminish resources sending between layers?
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 less resource heavy
and can be passed lightweight to the presentation layer.


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

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

Apr 21 '06 #2
If you are in 1 app-domain, then this is a false saving - in fact you are
making things significantly worse. This does apply if the two are separated
e.g. by a web-reference, though.

Perhaps a simpler option is to use a proper class to represent the data, and
then use MyClass[], List<MyClass>, Collection<MyClass> or whatever.

Marc
Apr 21 '06 #3
Forgot to add; you can data-bind to any object in 2.0 that uses properties
and the property change notification interface; it even has full designer
support - not that I trust it: I've seen it ditch pages too many times...

Marc
Apr 21 '06 #4
You can use any kind of custom object collection to pass the data to your
presentation layer. The problem you will run into is when you attempt to
bind the collection to controls. For that you will need a collection that
implements several standard interfaces (IEditable Object and others
depending on whether you need to do sorting and filtering in the UI
controls).

I use List<CustomObject> to pass the data to the presentation layer and I
then convert it to a BindingListView to bind it to controls. Take a look at
Brian Noyes book on Binding Data to Windows Forms 2.0 for more details on
that:
http://book.itzero.com/read/microsof...lev1sec12.html

<np*****@hotmail.com> wrote in message
news:11*********************@t31g2000cwb.googlegro ups.com...
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 less resource heavy
and can be passed lightweight to the presentation layer.

Thanks,
NJ

Apr 21 '06 #5


Atila Günes
cilek - cilek - cilek
Apr 21 '06 #6
Hi,

"Michael Nemtsev" <Mi************@discussions.microsoft.com> wrote in
message news:3A**********************************@microsof t.com...
How are u going to bind your custom object to the controls in UI?
Using DataSet/DataTables or what? It that case why not to serizalize
DataSet
binary to diminish resources sending between layers?


You can bind to any collection.
The serialization is an isssue though.

The most important performance improvement I found when I migrated one app
from using Dataset to use object collection was due to boxing/unboxing . It
improved almost 50% in some tight loops !
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Apr 21 '06 #7

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...
4
by: hs | last post by:
Hi I am serializing a dataset using a binary formatter as follows: IFormatter formater = new BinaryFormatter(); formatter.Serialize(stream, ds); // ds=DataSet, stream=MemoryStream .... DataSet...
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...
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: bob | last post by:
Hi, My app needs to read a text file, compare the data to that already stored in the DB and generate a text file of the differences. The UI displays the text file data and the db data in a...
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
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?
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
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
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...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.