By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,426 Members | 2,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,426 IT Pros & Developers. It's quick & easy.

Is CurrencyManager and DataBinding worth it?

P: n/a
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

Nov 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Nov 17 '05 #2

P: n/a
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]
- mv*@spam.guard.caspershouse.com
"Johann Blake" <jo*********@yahoo.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
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

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.