about Strongly typed DataSet

T

Tony

I just wonder what is your opinion about strongly typed dataset.
I have hardly used them at all so I wonder if these kind of dataSet should
be used instead of the untyped dataSet.

//´Tony
 
A

Arne Vajhøj

I just wonder what is your opinion about strongly typed dataset.
I have hardly used them at all so I wonder if these kind of dataSet
should be used instead of the untyped dataSet.

They are better than ordinary DataSet.

But I would still suggest that you go for an ORM.

Arne
 
M

Marcel Müller

I just wonder what is your opinion about strongly typed dataset.
I have hardly used them at all so I wonder if these kind of dataSet
should be used instead of the untyped dataSet.

If you have the choice between a typed and a untyped DataSet, the typed
one gives you more type safety and therefore some less bugs because the
compiler can detect them. OK, and your code might looks a bit more
pretty. But that's it. They have the same memory footprint and the same
inefficiency for data processing.

I had no use case where a DataSet (typed or not) was the best solution
since .NET 1.1 so far, and very few cases where it was a reasonable
solution. They are pretty for PowerPoint presentations, but for business
applications they do not solve more problems than they create. In most
applications we removed the DataSet after some time of development
because of various reasons. Only about a dozen DataSets survived the
first 6 months in production environment in the last 10 years.


Marcel
 
B

bradbury9

I just wonder what is your opinion about strongly typed dataset.
I have hardly used them at all so I wonder if these kind of dataSet should
be used instead of the untyped dataSet.

//´Tony

If using DataSet is a must, I would suggest using strong typed ones.
You save time debugging wrong named columns and if database is fine u
can check the constraints.

If you can choose using DataSets or other thing, give a try at other
data accesing way, like LINQ or other ORM.
 
A

Arne Vajhøj

If you have the choice between a typed and a untyped DataSet, the typed
one gives you more type safety and therefore some less bugs because the
compiler can detect them. OK, and your code might looks a bit more
pretty. But that's it. They have the same memory footprint and the same
inefficiency for data processing.

Typed data set relies on VS wizard code generation, which I consider
a (small) minus.

Arne
 
M

Marcel Müller

Typed data set relies on VS wizard code generation, which I consider
a (small) minus.

As long as you do not deal with the T4 code generator yourself, which is
a maintenance nightmare, the disadvantage is bearable.


Marcel
 
A

Arne Vajhøj

As long as you do not deal with the T4 code generator yourself, which is
a maintenance nightmare, the disadvantage is bearable.

Given that something like 99% of .NET developers use VS, then the
practical impact may not be big.

But a persistence technology with an IDE dependendcy? That does
not smell good!

Arne
 
M

Marcel Müller

I worked on an ASP.NET project that was based on datasets and datatables
using that wizard crap done on the client and service sides with VS2003
VB. It was an absolute nightmare to change.

You are right. VS >= 2005 silently destroys valid XSD schemas that
VS2003 handled correctly. I forgot about that problem.


Marcel
 
M

Marcel Müller

Given that something like 99% of .NET developers use VS, then the
practical impact may not be big.

But a persistence technology with an IDE dependendcy? That does
not smell good!

Turning a .NET project away from MS is a major redesign anyway. Almost
no .NET application comes without platform specific stuff.


Marcel
 
A

Arne Vajhøj

Turning a .NET project away from MS is a major redesign anyway. Almost
no .NET application comes without platform specific stuff.

If C# is the chosen language, then the OS (Windows) dependency
should not be a problem - or a different language should have
been chosen.

But an IDE dependency is something else than an OS dependency.

In theory people should be able to use notepad and build
command line without any other problems than a lot more typing.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top