PC Review


Reply
Thread Tools Rate Thread

Is CurrencyManager and DataBinding worth it?

 
 
Johann Blake
Guest
Posts: n/a
 
      20th Sep 2005
I've been playing around trying to bind textbox controls and datagrids
to typed datasets. Up until recently, I never used DataBindings. I
always manually wrote the value into a textbox and stored its value
after the textbox lost focus or whenever someone manually saved the
record. I came to the conclusion after a long time and after many apps
have been developed that there had to be a better way. What I thought
would have been great is simply create a typed dataset, use the IDE to
connect to the fields at design time and voila - instant binding. This
does work fine for very simple situations where there is a clear
parent-child relationship and controls are generally textboxes,
listboxes or even comboboxes. But reality started to sink in when my
dataset started becoming far more complex with many-to-many
relationships, complex relationships and what-have-you. What initially
started out as drag-drop, wizards and
"select-what's-available-in-the-property-window" started to require
coding enhancements such as BindingContext, CurrencyManager, DataViews,
and so on. After a while, I stood back and looked at the mess and began
seriously questioning what the point of it all was. I was trying to
avoid manually coding the databindings, updates, inserts, deletes, etc.
but I began to see almost as much code invested in getting automatic
binding to work. So the question is - it it really worth it? What do I
really gain? Has anyone done application development both ways to make
a comment? Any alternative suggestions?

Thanks
Johann Blake

 
Reply With Quote
 
 
 
 
Cor Ligthert [MVP]
Guest
Posts: n/a
 
      20th Sep 2005
Johann,

Sorry you get a question back on your question.

> After a while, I stood back and looked at the mess and began
> seriously questioning what the point of it all was. I was trying to
> avoid manually coding the databindings, updates, inserts, deletes, etc.
> but I began to see almost as much code invested in getting automatic
> binding to work. So the question is - it it really worth it? What do I
> really gain?


Can you without databinding get the results withouth code?

I don't believe it.

Adding/updating orderrows to an order from a client and that withouth any
code and with complete concurrency error checking.

However, if you have that, please show us how.

Cor


 
Reply With Quote
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      20th Sep 2005
Johann,

I can say I've done it the other way, not in .NET, but with other
technologies which aren't half as gracious as .NET is when it comes to data
binding.

I think something you said kind of indicated part of the problem. You
said that your data set was becoming far more complex (with many-to-many and
complex relationships, although I don't know what you mean by "complex
relationships").

If it is becoming more complex, perhaps a design review is in order.
It's not the databinding layer's fault if the underlying data is
uber-complicated.

This isn't saying that something is wrong with what you are doing, and I
will admit the data binding story isn't perfect, but I think it is a lot
better than the alternative. The fact that it is baked into every control
as well is a huge plus.

Something I've found is that while you can't change your back-end data
source, it doesn't mean that you have to use the structure as-is. I find
that changing the structure of the intermediary layer (the data set that
will hold the information) can reap big benefits.

Finally, is there a specific issue that you are having a problem with?


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)


"Johann Blake" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I've been playing around trying to bind textbox controls and datagrids
> to typed datasets. Up until recently, I never used DataBindings. I
> always manually wrote the value into a textbox and stored its value
> after the textbox lost focus or whenever someone manually saved the
> record. I came to the conclusion after a long time and after many apps
> have been developed that there had to be a better way. What I thought
> would have been great is simply create a typed dataset, use the IDE to
> connect to the fields at design time and voila - instant binding. This
> does work fine for very simple situations where there is a clear
> parent-child relationship and controls are generally textboxes,
> listboxes or even comboboxes. But reality started to sink in when my
> dataset started becoming far more complex with many-to-many
> relationships, complex relationships and what-have-you. What initially
> started out as drag-drop, wizards and
> "select-what's-available-in-the-property-window" started to require
> coding enhancements such as BindingContext, CurrencyManager, DataViews,
> and so on. After a while, I stood back and looked at the mess and began
> seriously questioning what the point of it all was. I was trying to
> avoid manually coding the databindings, updates, inserts, deletes, etc.
> but I began to see almost as much code invested in getting automatic
> binding to work. So the question is - it it really worth it? What do I
> really gain? Has anyone done application development both ways to make
> a comment? Any alternative suggestions?
>
> Thanks
> Johann Blake
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
{POLL} Windows Vista vs. Linux ? Worth the upgrade ? Worth the switchover? RonB Microsoft Windows 2000 59 17th Feb 2007 02:20 PM
{POLL} Windows Vista vs. Linux ? Worth the upgrade ? Worth the switchover? RonB Windows XP General 63 17th Feb 2007 02:20 PM
DataBinding problem - CurrencyManager Position is always equals to -1 John Yung Microsoft ADO .NET 2 18th Nov 2005 04:58 PM
DataBinding problem - CurrencyManager Position is always equals to -1 John Yung Microsoft Dot NET Framework Forms 2 18th Nov 2005 04:58 PM
Damn dirty databinding - why is CurrencyManager.Position changing??? Robert C. Nell Microsoft Dot NET Framework Forms 0 2nd Jun 2005 11:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 AM.