views:

355

answers:

2

Hi guys,

Am in the process of architecting a new windows forms application, and I intend to use Visual Basic 2008 and SQL Server Express 2005. This is my first application in .Net and I really want to observe the best OOD & OOP principles to create an application that is easy to maintain and extend (add new functionality). My issue is in regard to databinding on the UI. From experience, what do you guys recommend to use for databinding? Should I return datasets/datatables from my Business Layer and bind these to UI controls or should I return Business Objects and bind these to UI controls?

And what are the pros and cons of each approach?

Thanks!

+1  A: 

If you have a Business Layer in your application, you should definitely return back Business Objects to bind to your UI and not datasets/datatables.

In fact, your Business Layer itself should have a very limiting use of datasets/tables. I would say the only thing that should use tables and datasets would be your Data Access Layer.

This will provide the cleanest separation of concerns for your application. This will give you a lot of benefits, including: maintainability, readability, reuseability.

Joseph
A: 

Thanks Joseph. Got you loud and clear and now am headed in that direction.

How about accepting his answer, then?
mbeckish