473,320 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Is CurrencyManager and DataBinding worth it?

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
2 1893
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Tim Jarvis | last post by:
Hi, I have an object that I am binding to a text box, this object exposes a boolean field, and I have implemented a format event handler and a parse event handler for the binding object, where I...
1
by: Kevin | last post by:
Hi Al When I have a text box, list box, and a datagrid, how does a CurrencyManager relate to all these controls(seeing as though the datagrid uses Complex binding and textbox and list box use...
1
by: Pete Davis | last post by:
I have written a custom databound grid control that we've been using successfully for months, but one of our developers has just run into a problem that I can't figure out. The code for setting...
10
by: D | last post by:
hi I have a form with 2 datagrids showing related table data in a master / child or order / order details type relationship. I would like to auto select the row in the order details table which...
2
by: Mr Newbie | last post by:
Ive got the basic idea behind DataBinding Expressions, but I have a couple of questions, Ok its four actually :) Q1.) It would appear that if you use Page.DataBind that all child controls and...
1
by: Johnny Liner | last post by:
Hello... I am creating a CurrencyManager object and setting it like this ... Code: Dim cm as CurrencyManager (...) 'On Open event of form cm = Me.BindingContext(ds,"tblPersonData")
9
by: Dennis | last post by:
I have tried using Databinding for my application but always seem to find it very restrictive (maybe I don't completely understand it enough). I always seem to find it much easier to display a...
3
by: Brian Richardson | last post by:
Hi, Please can anyone kindly offer some suggestions as to why the CurrencyManager might not refresh. I am using the CurrencyManager to navigate through a DataView. I am aware that there is...
2
by: Rich | last post by:
Hello, Following an example at http://www.vb-tips.com/dbpages.aspx?IA=DG (by Cor Lightert and Ken Tucker) on binding a dataRelation to a Datagridview for sqlClient, I was able to view rows...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.