Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datasets in framework 2.0

Reply
Thread Tools

Datasets in framework 2.0

 
 
eugenet@rusmex.com
Guest
Posts: n/a
 
      09-11-2006
Hello,

In ASP.NET 1.1, I followed this data access methodology:

At design time
- Create a strongly typed dataset
- Add this dataset to a form and bind controls to the dataset using
the designer

At run time
- Fill dataset with data on the first load of the page
- Handle all Add/Edit/Delete operations against the in-memory copy
of my dataset
- Persist the dataset between postbacks in session
- Give users the ability to Save or Cancel changes, which either
persists the changes to the database or discards them.

It worked like a charm -- there were only two trips to the database --
in the very beginning and at the very end. In memory manipulations were
very fast. And, more importantly, my productivity was high because I
was able to use design features of the Visual Studio.

It seems that in 2005, if I were to pursue the same methodology, things
would be harder, not easier.

- It appears that the only way to bind a dataset to a gridview is
through the ObjectDataSource. This binds to data adapters, not the
actual dataset, so, the database gets hit on each update.

- DataSource property is gone from the design view, so I no longer can
use the design features of Visual Studio, if I were to directly bind to
a dataset.

- There is no out of the box feature to persist a dataset between
postbacks. So, like in 1.1, if I were to go this route, I would have to
persist it in session.

I was wondering if there is anybody out there who used the 1.1 data
access in a similar fashion, and how you adapted to 2.0.

Thank you for your comments.

Evgueni

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      09-12-2006
Evgueni,

It seems that your problem is in overestimating the role of the designer. In
fact, many developers, including myself, hardly use the designer at all. You
can achieve everything in the html view and in the code much more
efficiently, without relying on sometimes obscure logic of the designer.
Then you will find you can continue handling datasets in exactly the same
way as in 1.1.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> Hello,
>
> In ASP.NET 1.1, I followed this data access methodology:
>
> At design time
> - Create a strongly typed dataset
> - Add this dataset to a form and bind controls to the dataset using
> the designer
>
> At run time
> - Fill dataset with data on the first load of the page
> - Handle all Add/Edit/Delete operations against the in-memory copy
> of my dataset
> - Persist the dataset between postbacks in session
> - Give users the ability to Save or Cancel changes, which either
> persists the changes to the database or discards them.
>
> It worked like a charm -- there were only two trips to the database --
> in the very beginning and at the very end. In memory manipulations were
> very fast. And, more importantly, my productivity was high because I
> was able to use design features of the Visual Studio.
>
> It seems that in 2005, if I were to pursue the same methodology, things
> would be harder, not easier.
>
> - It appears that the only way to bind a dataset to a gridview is
> through the ObjectDataSource. This binds to data adapters, not the
> actual dataset, so, the database gets hit on each update.
>
> - DataSource property is gone from the design view, so I no longer can
> use the design features of Visual Studio, if I were to directly bind to
> a dataset.
>
> - There is no out of the box feature to persist a dataset between
> postbacks. So, like in 1.1, if I were to go this route, I would have to
> persist it in session.
>
> I was wondering if there is anybody out there who used the 1.1 data
> access in a similar fashion, and how you adapted to 2.0.
>
> Thank you for your comments.
>
> Evgueni
>



 
Reply With Quote
 
 
 
 
eugenet@rusmex.com
Guest
Posts: n/a
 
      09-12-2006
Eliyahu, thank you for your reply.

I hear you about doing things manually, but one of the main reasons I
switched to .NET was to be more productive. I recognized the fact that
Microsoft was pushing data binding and rich design time experience and
accepted it as a part of my coding style. So, in 1.1 it worked very
well -- generate a strongly-typed dataset, bind it to controls, but
then manually control how/when data gets pushed/pulled from the
dataset. It was both productive and efficient.

It seems that in 2.0, Microsoft provides a rich design experience to
those folks who can leave with multiple round trips to the database,
but to those who want to take advantage of design features, while have
control over data access, things got a little more complicated.

Perhaps, extending DataSource control is the way to go in order to
accomplish what I need. I will look into that next.

Evgueni




Eliyahu Goldin wrote:
> Evgueni,
>
> It seems that your problem is in overestimating the role of the designer. In
> fact, many developers, including myself, hardly use the designer at all. You
> can achieve everything in the html view and in the code much more
> efficiently, without relying on sometimes obscure logic of the designer.
> Then you will find you can continue handling datasets in exactly the same
> way as in 1.1.
>
> --
> Eliyahu Goldin,
> Software Developer & Consultant
> Microsoft MVP [ASP.NET]
>
>
> <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) ups.com...
> > Hello,
> >
> > In ASP.NET 1.1, I followed this data access methodology:
> >
> > At design time
> > - Create a strongly typed dataset
> > - Add this dataset to a form and bind controls to the dataset using
> > the designer
> >
> > At run time
> > - Fill dataset with data on the first load of the page
> > - Handle all Add/Edit/Delete operations against the in-memory copy
> > of my dataset
> > - Persist the dataset between postbacks in session
> > - Give users the ability to Save or Cancel changes, which either
> > persists the changes to the database or discards them.
> >
> > It worked like a charm -- there were only two trips to the database --
> > in the very beginning and at the very end. In memory manipulations were
> > very fast. And, more importantly, my productivity was high because I
> > was able to use design features of the Visual Studio.
> >
> > It seems that in 2005, if I were to pursue the same methodology, things
> > would be harder, not easier.
> >
> > - It appears that the only way to bind a dataset to a gridview is
> > through the ObjectDataSource. This binds to data adapters, not the
> > actual dataset, so, the database gets hit on each update.
> >
> > - DataSource property is gone from the design view, so I no longer can
> > use the design features of Visual Studio, if I were to directly bind to
> > a dataset.
> >
> > - There is no out of the box feature to persist a dataset between
> > postbacks. So, like in 1.1, if I were to go this route, I would have to
> > persist it in session.
> >
> > I was wondering if there is anybody out there who used the 1.1 data
> > access in a similar fashion, and how you adapted to 2.0.
> >
> > Thank you for your comments.
> >
> > Evgueni
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net Web Services 3 04-13-2006 05:53 PM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? Francisco Garcia ASP .Net 2 04-13-2006 10:41 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net Web Services 0 04-12-2006 09:07 AM
How do Datasets manage to get deserialized as DataSets instead of a wsdl.exe-created proxy class? news.microsoft.com ASP .Net 0 04-12-2006 09:07 AM
Type fidelity - reusing mechanism used by framework to serialize Datasets ?? Matt ASP .Net Web Services 3 11-29-2004 08:12 PM



Advertisments