Re: Decouple SQL queries from class in OOP design
- From: "Mikito Harakiri" <mikharakiri_nospaum@xxxxxxxxx>
- Date: 18 Nov 2005 16:43:48 -0800
Robert C. Martin wrote:
> On 9 Nov 2005 17:35:50 -0800, "Hongyu" <forward@xxxxxxxxxx> wrote:
>
> >To my knowledge, in OOP design it's not good to mix SQL queries with
> >application codes in classes, because it limits the usability of the
> >classes and bound them to the local database schema.
>
> Indeed, it is not good to mix SQL with business rules in *any*
> paradigm. You'd like your business rules to know nothing of SQL.
> You'd also like your business rules to know nothing of the relational
> schema. The business rules want to use a convenient set of data
> structures (or objects).
Cool. When I forget my badge and show
up at the front door and give them my employee ID, it is sure nice not
to have an
EMP table and query it directly, but send a message to each and every
DEPT
instance to ask "does emp 1234 work for you?"
This funny interface separation idea is one of the reasons why data
mangement folks call OOP crowd incompetent.
.
- Follow-Ups:
- Re: Decouple SQL queries from class in OOP design
- From: Robert C . Martin
- Re: Decouple SQL queries from class in OOP design
- From: Bruno Desthuilliers
- Re: Decouple SQL queries from class in OOP design
- From: Ilja Preuß
- Re: Decouple SQL queries from class in OOP design
- From: EricF
- Re: Decouple SQL queries from class in OOP design
- From: Hongyu
- Re: Decouple SQL queries from class in OOP design
- References:
- Decouple SQL queries from class in OOP design
- From: Hongyu
- Re: Decouple SQL queries from class in OOP design
- From: Robert C . Martin
- Decouple SQL queries from class in OOP design
- Prev by Date: Re: Decouple SQL queries from class in OOP design
- Next by Date: agile development and frameworks
- Previous by thread: Re: Decouple SQL queries from class in OOP design
- Next by thread: Re: Decouple SQL queries from class in OOP design
- Index(es):
Relevant Pages
|