"Alan" <NO**************@yahoo.com.au> wrote in message
news:uo**************@TK2MSFTNGP09.phx.gbl...
I am coming from other programming tools field, and new to VB .NET. Just
wondering what is the common approaching in database programming in VB
..NET?
1) Are you guru always using the data aware controls to bound the database
? OR
2) Create separate data object/layer to access backend database and link
to the front end ?
ie.
front <--> business <--> database <--> backend
end object layer database
Certianly different people do it different ways. But I would say that there
is an emerging practice of using "bindable" business objects. ADO.NET makes
this very easy with it's disconnected and stongly typed datasets. Although
it's also possible to implement the interfaces that support databinding on
custom business objects.
The idea is that 1) and 2) are no longer the only choices. You can mix them
for a best-of-both-worlds approach. On the one hand a DataSet or DataView
does not have to be bound directly to your database. They are just
middleware data storage objects. And on the other the front end controls
can be bound to objects other than the intrinsic ADO.NET data storage and
retrevial objects. Custom objects can be made bindable too.
Here's where it gets more controversial. One thing I look for is ways to
add simplicity to applications, and I prefer a pay-as-you-go approach for
simple applications. It's just too hard to see into the future, and
therefore too easy to over-engineer a solution. Directly binding
applications to the database sure is simple. I think that for a simple
application you can do this "guiltlessly" since you can later interpose a
business object layer without too much disruption. Just have the new
business objects output the bindable objects that the UI expects.
David