Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 3rd, 2007, 08:42 AM
Registered User
 
Join Date: Jan 2007
Location: Melbourne, Victoria, Australia.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default bound Vs unbound controls on front ends

Hi,

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?

Thanks,
Richard
Reply With Quote
  #2 (permalink)  
Old January 6th, 2007, 12:28 AM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear Richard,

I am just sharing my varied and long experience with you. I can not claim to be an expert in Visual Studio.

1. When it comes to database Management and especially web based applications developed in ASP.net, I prefer to have a [u]SEPERATE CLASS LIBRARY</u> developed exclusively for data management. These classes provide all the possible data management such as data updation, data retrieval etc.

2. I use store procedures very extensively and do not allow users, direct access to any base tables or crucial views for reasons of security.

3. This approach has given me the flexibility to change from one database vendor to another with minimum of changes, which remain confined only to this data management class library, e.g. if I am using SQL Server 2000 then
Imports system.data.sqlclient

and if I have to use any other database then
Imports system.data.oledbclient.

4. Any modifications in the business logic such as change of a calculation formula etc., are confined to stored procedures only and do not affect my source code. Moreover, I can present the same data in numerous ways, can filer on different keys etc. [u]dynamically</u> threby keeping my front end same while providing necessary result set to front end.

I have found it more convenient [u]NOT TO BIND CONTROLS </u>to the Back end, may it be a complex data grid or drop down lists.

With Regards,

Dilip Nagle



Reply With Quote
  #3 (permalink)  
Old January 9th, 2007, 08:36 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by Richard_AU
 Hi,

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?

Thanks,
Richard
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
http://www.learntoprogramnow.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prefer Not To Use Data-Bound Controls... soundchaser59 ASP.NET 2.0 Basics 1 July 9th, 2007 09:13 PM
Bound Vs Unbound controls Richard_AU ADO.NET 1 January 16th, 2007 01:40 PM
Bound Controls cpanson ADO.NET 0 June 24th, 2006 07:29 PM
Accessing bound controls through javascript dungerdanish Classic ASP Professional 0 June 21st, 2005 05:23 AM



All times are GMT -4. The time now is 10:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.