Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

To use Bound Controls or not to Use Bound Controls?

Status
Not open for further replies.

RotorTorque

Programmer
Apr 29, 2007
100
US
Hi all,
I have been asked to write a Help Desk type application in VB.Net 2005. My supervisor likes using bound controls, but I am a bit Old School and was taught to avoided using bound controls at all costs. Am I right in avoiding bound controls? Have bound controls been improved in VB2005? What are the pros and cons of using these types of controls?

Thanks in advance,
RotorTorque :)
 
Depends on what type of binding you are talking about.
Microsoft has tons of "automated" bound controls to make it easy to tie to controls to values and to other controls. These can be difficult to troubleshoot though. If you don't have a middle tier and plan on working directly with the database, which I don't agree with, then you can use some of MS data access objects, and create a feel similar to a MS access application.

I use a form of custom binding where when the form loads I tie it to my middle tier, that way they always stay in sync. You have to make sure that when you change the values in your middle tier that you populate up a value changed event, which is why I strongly argue for using properties, because you shouldn't be directly touching your private member(s).


-The answer to your problem may not be the answer to your question.
 
With VB6, "Bound Controls are EVIL" was one of my favorite sayings (Google it)

Not true with VB.Net, though. Bound controls are just as flexible as unbound controls in Net.

-David
2006 & 2007 Microsoft Most Valuable Professional (MVP)
2006 Dell Certified System Professional (CSP)
 
Thank you Qik3Coder and dglienna.

dglienna,
With the app I am currently writing there is the possibility of multiple users (10 -100) running the application simultaniously. Will using bound controls cause and efficiency problem since they are always connected to the Database?

RotorTorque :)
 
If you use ADO.Net, your users will not be connected to the database. ADO.Net uses a disconnected architecture.
 
Hi all,

If I use bound controls, then is there still a need for
n-tier architecture?

RotorTorque
 
Always.

most controls can also be bound to collections or to domain entities.

Christiaan Baes
Belgium

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top