Is it really wise to use strongly-typed datasets?

  • Thread starter Thread starter Earl
  • Start date Start date
E

Earl

I've been mulling this question since I started using .Net in 2003. Seems
like a lot of effort to rearrange code to get the data layer out of the UI
layer. It seems like a nice quick-and-dirty solution, but long term, is it
really the wise thing to use drag-drop dataadapters??
 
Earl,

As long as you drag them on a component instead of a form (UI) there is no
any problem in 2003. A pity is that the most samples are draging them on
forms to show how it works and that is than taken as how to do.

This concept is not any more in version 2005.

I hope this gives an idea,

Cor
 
The drag and drop stuff paints you into a box. Whether that box is good or
bad depends on your application, your coding style and standards, etc.

In 2005, you have TableAdapters. They work very similar to many of the code
gen products out there. Unfortuantely, they do not automagically set up
multi-table DataSets to auto-update. It could be done, based on
dependencies, but you will have to control this ... for now. Useful in
Enterprise Architecture? Sure, why not?

As for getting the data layer out of the UI, I am not sure what you mean. If
you mean the "all in one" objects in .NET 2.0, I agree with you. Can them.
If, instead, you are setting up your layers and using drag and drop, there
is no problem. The DataSets are set up as components, which allows you to
add to UI. The TableAdapeter makes things easier in some respects and harder
in others. I am not sure I am completely shot in the butt with them, but you
can still create bindable components no matter how you are filling the
DataSets.

In short
1. There is nothing wrong with DataSets
2. THere is nothing wrong with drag and drop, but you should understand what
is going on underneath the hood
3. I personally detest the "all in one" data objects. Your mileage may vary.
:-)

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
That's really the sort of drag-drop thing I'm trying to get away from. Do
you know of an example that does this with a component vs. a form?
 
What would the difference be? Does it matter if the example shows drag and
dropping onto a form vs. a component? In the end, you are still drag and
dropping these objects and using the wizard - exact same thing.
 
Earl,

Exactly as Marina says, however the advantage is that you can use the
created component class in all your forms as a kind of data acces layer.

Cor
 
Back
Top