Windows Application with Database Layer

  • Thread starter Thread starter Jonathan Lurie
  • Start date Start date
J

Jonathan Lurie

Hi,
I am developing a windows base project using SQL Server database.
My question is, is it always a good idea to have a seperate layer for
database transactions.
Should I put my database code along with user interface layer code or should
I put my database code seperate.

John.
 
Good practice calls for the separation of the UI from the logic. It's a
good idea because the only thing the application knows is that it's invoked
a specific function asking for some information, and it does not know how
that was implemented. This allows you to change code in the Data Layer in
the future without having to worry about changing the interface layer as
well.

HTH
S.M. Altaf
[MVP-VB]
 
A data layer is a good idea.

I understand what you mean by database code is "SQL Statements" ? If that is
so, it doesn't really matter too much if they are stored procs or embedded
parameterized sql . I say mix'n'match :)
 
Back
Top