View Single Post
  #3 (permalink)  
Old January 9th, 2007, 08:36 PM
woodyz woodyz is offline
Friend of Wrox
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts

quote:Originally posted by Richard_AU

My question is a generic question.
I am new to .NET. For now I am learning VB.NET 2005 from wrox books with ample examples of bound controls using ADO.NET.
But, should front-ends have bound controls at all? Say, you have SQL server as a back-end with your database and you want to build a front-end. Will you build your application with bound controls or is it better to build your application with unbound controls (that is, do not bound your controls to base tables at all). Instead have one "I/O" class where all interaction with the back-end is done. That class serves your different data entry forms and your reports.

Which way would you recommend and why?

In VB6 I never used bound controls, and often spent a lot of time working on projects where bound controls had been used and it was found to be more problems than it was worth.

In .NET I still don't typically use bound controls, but I have worked on projects where they are used. Binding directly to data tables isn't the only way to go. There is another layer to consider - and another set of objects other than DataTables. In .NET you can bind controls to your own custom "business" objects. And although in .NET the DataTables/Sets are disconnected from the database and provide a lot of nice features, using your own business object collections allow for a lot more custom control over the functionality.

Anyway - for some uses the bound controls are useful. If you truly have at least the 3 common layers (presentaion, business, data access) then if you want to bind your controls you will want to learn about binding to custom business objects.

There is a lot of info on this on the internet. A good resource book on this is Rocky Lhotkas business object books. He used to be with Wrox, but the newer books are with Apress.

Woody Z
Reply With Quote