E
ErwinB
Hi all,
I have a question. Maybe it has been answered a zillion times, but I
don't seem to find the answer.
It's not so much a practical question, although it has practical
implications.
As we all know, C# is an OOP, i.e. we are supposed to treat entities
as objects (e.g. in the application I'm writing right now, there are
objects like "Site", "Customer", "WishList", etc). The data about
these entities are stored in a dabase.
With Windows Forms or ASP.NET controls, you can immediately bind to
the tables in the database. But doesn't good programming practice tell
us to use 3 layers : Presentation Layer (in which the object gets
displayed), Business Layer (in which business actions are performed on
or with the object), and Data Acess Layer (in which the object
interacts with its data source) ?
Using a control like DataGridView to bind immediately to a table seems
to skip these layers. Or should the DataGridView be considered as the
encapsulating object ?
I'm not trying to start up a theoretical debate here, I just want some
clear guidelines.
Thanks for your input
Erwin
I have a question. Maybe it has been answered a zillion times, but I
don't seem to find the answer.
It's not so much a practical question, although it has practical
implications.
As we all know, C# is an OOP, i.e. we are supposed to treat entities
as objects (e.g. in the application I'm writing right now, there are
objects like "Site", "Customer", "WishList", etc). The data about
these entities are stored in a dabase.
With Windows Forms or ASP.NET controls, you can immediately bind to
the tables in the database. But doesn't good programming practice tell
us to use 3 layers : Presentation Layer (in which the object gets
displayed), Business Layer (in which business actions are performed on
or with the object), and Data Acess Layer (in which the object
interacts with its data source) ?
Using a control like DataGridView to bind immediately to a table seems
to skip these layers. Or should the DataGridView be considered as the
encapsulating object ?
I'm not trying to start up a theoretical debate here, I just want some
clear guidelines.
Thanks for your input
Erwin