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

Dataset to Custom Collection converter?

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 class on-the-fly
based on the fields in the dataset and then creates and populates the
classes and adds them into the collection.

Thanks

Simon
Oct 29 '07 #1
5 3470
Simon,

A non strongly typed dataset itself is a Class, that exist from collections
of DataTables and Relations, however indexed by field names, indexes and in
the case of rowitems datacolumns.

When you use an XSD you can automaticly create a strongly typed dataset,
which makes it possible direct to address the properties of the items.
Therefore can you give us some more informoation what you mean with a
collection of custom objects.?

Cor
Oct 29 '07 #2
Cor Ligthert [MVP] wrote:
Simon,

A non strongly typed dataset itself is a Class, that exist from collections
of DataTables and Relations, however indexed by field names, indexes and in
the case of rowitems datacolumns.

When you use an XSD you can automaticly create a strongly typed dataset,
which makes it possible direct to address the properties of the items.
Therefore can you give us some more informoation what you mean with a
collection of custom objects.?

Cor
Thanks Cor

A bit more background ... it's fundamentally an architecture issue which
I don't think I've got my head round (that may be an understatement!).
There seem to be a fair amount of debate about whether to opt for custom
collections or datasets, when passing data across n-tiered apps. It
seems that a common (preferred?) practice, for enterprise-type apps at
least, is to convert the dataset via data transfer objects into business
objects. This is fine, istm, when the business object can be predefined.

However, the app I'm working on is a querying app. So the user can
specify and retrieve whatever they want. A dataset is the obvious way to
transfer data from the back-end to the UI, wrapped up in a business
object and then, for example, being a binding source or whatever. I was
wondering about the possibility of constructing classes (and their
collections) on-the-fly[1] and using the collection as a binding source
- the SQLs SELECT clause effectively providing the template to the class
structure.

It strikes me that the typed-dataset is still fundamentally oriented
toward the underlying RDMBS structures rather than the business. Further
because all the processing is being done behind the scenes, I can't see
that the typing aspect of the dataset really offers any benefit in this
scenario (unless there's someway to transpose the dataset structure into
a class structure). The other thing is that I'm using a third party
framework which effectively encapsulates the network, but to do this my
business objects need to inherit certain classes from that framework.
The only way I could see this being facilitated is by having a
predefined business object which both inherits the framework class, and
also holds a property to which the dataset can be assigned.

But perhaps I'm way off beam! Interested in any advice or thoughts though.

Simon

1. I was experimenting with the CodeDom - there's an earlier post on
this ng - to see if it was possible, but the more I've played around
with it, the less convinced I was that it is a good way to go. I wonder
whether dotnet would need to be more dynamic i.e. Ruby-like - or perhaps
there are other aspects of dotnet I'm unware of which would make this
easy for me?
Oct 30 '07 #3
Simon,

do you ***have*** to use DataSets?

if not have a look at LLBLGen(www.llblgen.com)

cheers

Guy

Simon Woods" wrote:
Cor Ligthert [MVP] wrote:
Simon,

A non strongly typed dataset itself is a Class, that exist from collections
of DataTables and Relations, however indexed by field names, indexes and in
the case of rowitems datacolumns.

When you use an XSD you can automaticly create a strongly typed dataset,
which makes it possible direct to address the properties of the items.
Therefore can you give us some more informoation what you mean with a
collection of custom objects.?

Cor

Thanks Cor

A bit more background ... it's fundamentally an architecture issue which
I don't think I've got my head round (that may be an understatement!).
There seem to be a fair amount of debate about whether to opt for custom
collections or datasets, when passing data across n-tiered apps. It
seems that a common (preferred?) practice, for enterprise-type apps at
least, is to convert the dataset via data transfer objects into business
objects. This is fine, istm, when the business object can be predefined.

However, the app I'm working on is a querying app. So the user can
specify and retrieve whatever they want. A dataset is the obvious way to
transfer data from the back-end to the UI, wrapped up in a business
object and then, for example, being a binding source or whatever. I was
wondering about the possibility of constructing classes (and their
collections) on-the-fly[1] and using the collection as a binding source
- the SQLs SELECT clause effectively providing the template to the class
structure.

It strikes me that the typed-dataset is still fundamentally oriented
toward the underlying RDMBS structures rather than the business. Further
because all the processing is being done behind the scenes, I can't see
that the typing aspect of the dataset really offers any benefit in this
scenario (unless there's someway to transpose the dataset structure into
a class structure). The other thing is that I'm using a third party
framework which effectively encapsulates the network, but to do this my
business objects need to inherit certain classes from that framework.
The only way I could see this being facilitated is by having a
predefined business object which both inherits the framework class, and
also holds a property to which the dataset can be assigned.

But perhaps I'm way off beam! Interested in any advice or thoughts though.

Simon

1. I was experimenting with the CodeDom - there's an earlier post on
this ng - to see if it was possible, but the more I've played around
with it, the less convinced I was that it is a good way to go. I wonder
whether dotnet would need to be more dynamic i.e. Ruby-like - or perhaps
there are other aspects of dotnet I'm unware of which would make this
easy for me?
Oct 30 '07 #4
Thanks Guy ... I'll have a look.

guy wrote:
Simon,

do you ***have*** to use DataSets?

if not have a look at LLBLGen(www.llblgen.com)

cheers

Guy

Simon Woods" wrote:
>Cor Ligthert [MVP] wrote:
>>Simon,

A non strongly typed dataset itself is a Class, that exist from collections
of DataTables and Relations, however indexed by field names, indexes and in
the case of rowitems datacolumns.

When you use an XSD you can automaticly create a strongly typed dataset,
which makes it possible direct to address the properties of the items.
Therefore can you give us some more informoation what you mean with a
collection of custom objects.?

Cor
Thanks Cor

A bit more background ... it's fundamentally an architecture issue which
I don't think I've got my head round (that may be an understatement!).
There seem to be a fair amount of debate about whether to opt for custom
collections or datasets, when passing data across n-tiered apps. It
seems that a common (preferred?) practice, for enterprise-type apps at
least, is to convert the dataset via data transfer objects into business
objects. This is fine, istm, when the business object can be predefined.

However, the app I'm working on is a querying app. So the user can
specify and retrieve whatever they want. A dataset is the obvious way to
transfer data from the back-end to the UI, wrapped up in a business
object and then, for example, being a binding source or whatever. I was
wondering about the possibility of constructing classes (and their
collections) on-the-fly[1] and using the collection as a binding source
- the SQLs SELECT clause effectively providing the template to the class
structure.

It strikes me that the typed-dataset is still fundamentally oriented
toward the underlying RDMBS structures rather than the business. Further
because all the processing is being done behind the scenes, I can't see
that the typing aspect of the dataset really offers any benefit in this
scenario (unless there's someway to transpose the dataset structure into
a class structure). The other thing is that I'm using a third party
framework which effectively encapsulates the network, but to do this my
business objects need to inherit certain classes from that framework.
The only way I could see this being facilitated is by having a
predefined business object which both inherits the framework class, and
also holds a property to which the dataset can be assigned.

But perhaps I'm way off beam! Interested in any advice or thoughts though.

Simon

1. I was experimenting with the CodeDom - there's an earlier post on
this ng - to see if it was possible, but the more I've played around
with it, the less convinced I was that it is a good way to go. I wonder
whether dotnet would need to be more dynamic i.e. Ruby-like - or perhaps
there are other aspects of dotnet I'm unware of which would make this
easy for me?
Oct 30 '07 #5
Simon,

As you can see using LLBGen there are more solutions. However be aware that
the reflection of a dataset to a database is not a matter of how it has to
do with the business. It is the true limitation of a SQL based database
servers. You cannot make complex types in that. It exist from related tables
with fields and that it is, whatever magical they write about it.

The advance from ADONET and the Dataset is, is that it is probably the
maximum reaching the off line handling of that. (If you have complex
datatypes in an XML file it makes from it by instance more tables in a
Dataset).

Be aware that there is in my idea a very big retro group who is still
talking about Multi Tier application. However, that are not real multi tier
applications as they were ever designed in past. It are just datalayers
however it sounds nice to call them Tiers. Tiers work in my opinion
assynchroon as they did in MultiUser computers. However in a nice client
server concept as the Windows OS systems is there in most normal situations
not any need for that.

(Before you understand me wrong, I like multilayer solutions, however that
is not a goal for me. The goal is a good working and maintanable solution).

About your wish to make data and type independent classes, you are really
not the first who is wanting to create an MS Office Access solution, however
better, and then be disapointed that in the end the users will ask you why
it is not like MS Access. The change that your solution ends in spaghetti is
difficult to prevent.

As last and not only to prevent that Frans get angry on me. I have seen in
this dotNet newsgroups only very positive reactions about the use of LLBGEN.
So despite my message for sure worth to investigate.

Just my opinion.

Cor

Oct 30 '07 #6

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...
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...
0
by: Tom | last post by:
I am developing a page that will contain multiple instances of a Composite Custom Control that i have developed. The problem is that the user will determine at run time how many of the control...
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...
3
by: JimGreen | last post by:
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...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
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
2
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a collection property named "Columns". this collection property add/remove column objects. in my Column class i have a property named Alignment...
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: 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?
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
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.