Re: Decouple SQL queries from class in OOP design
- From: "topmind" <topmind@xxxxxxxxxxxxxxxx>
- Date: 9 Nov 2005 21:59:18 -0800
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
.
- Follow-Ups:
- Re: Decouple SQL queries from class in OOP design
- From: Robert C . Martin
- Re: Decouple SQL queries from class in OOP design
- References:
- Decouple SQL queries from class in OOP design
- From: Hongyu
- Decouple SQL queries from class in OOP design
- Prev by Date: Re: Small Cohesive Objects - Configuration
- Next by Date: Re: Decouple SQL queries from class in OOP design
- Previous by thread: Decouple SQL queries from class in OOP design
- Next by thread: Re: Decouple SQL queries from class in OOP design
- Index(es):
Relevant Pages
|