which to use w/ asp 2.0 -- strong-typed or not?

  • Thread starter Thread starter Jason Shohet
  • Start date Start date
J

Jason Shohet

I spent many frustrating days getting strong-typed data-access to work with
ASP.NET and ultimately gave up on it. It seemed also that all the pro's
thought it was a pain in the *SS, and not many used it. Make a change to a
field in the database, and all your stuff is messed up. You have to go back
in to the wizards etc and redo it all.

I'm wondering if I should also avoid strong-typed in ASP.NET 2.0, just
stick with coding datasources in code-behinds and forget all the
configuration wizards etc? I haven't fooled around with 2.0 yet but i was
wondering what you all think....

TY
Jason Shohet
 
Well typed datasets are good and bad.....

I use them for most projects as it is a quick way to get everytrhing up and
running easily...

however i dont EVER use the update , and delete methods at all..

I write my own code to update the row to the DB..... (mainly as i built a
code gen to do this)

one easy way to manage changes... use views... then simply create your
datasets from your views.

So when you change a column in the db.,... add it to the view and add to the
typed dataset and you are pretty much there. Well the same amount of work if
you were useing custom data objects as you would have to add the properties
etc.

The best thing i find about typed datasets is the ease of use.... eg easy
filling a whole list and it allows you to not have to have connections open
once you ahve your data... unlike datareaders. And then being able to bind
it to anything... Rather than custom data objects that store collections etc
(then you end up using datareaders anyway)

Also being able to save the state of a data object using the getXMl and
readXML i find very handy also.... YES you could use serilizeation of custom
dataobjects but why when the the code is already written....

BAD...
I would think that the performance might not be that great for huge datasets
(however not sure cuz havent tested).... But if you are dealing in massive
datasets then you would usually have a dev team large enough to handle the
extra work involved in setting up the fill and update routines.
if you are a one man shop or in a small team, anything that helps you
produce faster code is good.....

as for ASP.NET 2.0, i have read that type dataset will go that one step
futher and will allow you to write some strong biz rule validation in
there... but that is all i konw as i havent had much time to read.... To
busy producing work...



daz

www.webling.com.au
 
I just write my own domain-specific classes and don't bother using Datasets
at all.
 
Back
Top