Roy, your right about it being a design decision. We
decided to treat out TDS's as DTO's as opposed to
business objects, which i think works great and allows
you to pass your object "through"
business logic instead of being coupled with it. But
again it depends on your ultimate architecture... there
a lots of ways to solve the same problems. Also, i think
updating a TDS is very trivial and shouldn't be seen as
a challenge in terms of maint. as compared to custom
business entities.
Nathen: Type Safety is important. But In order to keep
the Presentation layer seperate from the data layer, you
can't have a direct reference to the typed datasets
(IMO). The only way to incroporate them into an
enterprise application is stated in this post(See the
ending paragraph - It essentially implies what you are
suggesting). Also, If TD's are god for enterprise apps,
why wouldn;t ehy be good for small apps?
I'm afraid that you have only explored the peak of the
iceberg. As an example you are not considered that the
DataSet could be business based and nor DataBase Based.
By the way the data access layer is the Database itself
with its SP, and not the access to it, that should be in
the business layer getting flexibility doing that.
Try using partial classes to inject your business rules.
very powerful feature of partial classes
I agree with the original poster's technical lead. I am
a proponent of hiding datasets within my business
objects.
However, My DataGridView needs the dataset to bind to
and this defeats all my atempts to make the dataset
private to my business objects. Any solutions to this
problem ?
--Sharad Singhal
I asume your DataGridView is inheriting from the
DataGrid.
Well the datagrid looks for some Interfaces like
IListSource and IList
If you give a good look at the DataSet or DataTable they
implement de interface IListSource.
So de code:
.SetDataBinding(CType(,ListSource),)
Will Work.
If you Implement the Interface IListSource in your
Business objects.
I think that we would have to improve our world with
innovations and more design patterns to help development
process and "Typed Datasets" do not explores our
creativity and do not enriches developed applications.
They comes to ease, it does not come to improve.