Re: Decouple SQL queries from class in OOP design



SQL in code is not evil[1]. SQL is a protocol, not an implementation.
Wrapping a protocol with yet another protocol is too much indirection
most of the time. Stop turning programming code into a layered
beurocracy just to hide from a non-existent boogie-man of OO purists
who want to burn anything that is not OO.

Maybe there is only a 1-in-15 chance of having to switch DBMS vendors.
However, the cost of the layers happens 100% of the time if you build
them. It is usually bad economics; probability-based cost-benefit
analysis is against it. Only put wrappers around commonly-used stuff
that varies only by a parameter or 2. Let repetition of use be your
guide, not dogma.

[1] Although sql is not the best possible relational language.

-T-
oop.ismad.com

.



Relevant Pages

  • Re: Database Server based on SQL database
    ... SQL is a language, not a protocol - they are two different things. ... TDS originated with Sybase and is used by SQL Server (earlier versions were ... both the client and the server side. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Fix of problem connecting VS2005 to remote Sql 2000 server
    ... Make sure your SQL server is listening on port 1433, that is, on service ... you need to make sure you connect to the SQL server using the ... In the "SQL Native Client Configuration", select Client Protocol and make ...
    (microsoft.public.dotnet.languages.csharp)
  • Service fails to start when only tcp/ip protocol is set
    ... Does anyone out there have experience with the sql service ... fails to start when you set tcp/ip only protocol in the ...
    (microsoft.public.sqlserver.server)
  • Re: sql setup error
    ... Use the SQL Server Configuration manager to ensure that the ... via protocol is disabled on both the client and the server. ...
    (microsoft.public.sqlserver.setup)
  • Re: Relational-to-OOP Tax
    ... the possible advantages with wrapping all SQL statements in a separate ... a good argumentation why wrapping a standardized language ... or why yet another layer would increade ... If SQL and Java -code are kept in separate ...
    (comp.object)