Re: OOP/OOD Philosophy
- From: "frebe" <fredrik_bertilsson@xxxxxxxxxxx>
- Date: 9 Jul 2005 22:02:15 -0700
> Now that you mention it, I have seen hierarchical data access built
> directly into a UI with no separation.
> Separation would've come in handy when relational became popular, right?
The problem is that every new generation of data model moves the border
between database logic and "business" logic. For example, before the
relational model we had a hierachical database like this:
customer A
-order 1
-part A
-order 2
-part B
customer B
-order 3
-part B
-order 4
-part A
Now we want to write a function to find every customers ordering part
A. The "busniess" logic might look like this:
customers = Set()
for each customer:
for each order:
for each part:
if (part = 'A'):
customers.add(part)
Then relational databases came, this would not longer be "business"
logic. It would be replaced by
select distinct customerid from order join orderrow on
order.orderid=orderrow.orderid
where partno='A'
Or worse, the old "business" logic would be keept and the relational
database would be traversed as a hierarchial one (this I have seen many
times).
The idea that "business" logic could be separated from database logic
is an illusion. The next generation of data model will probably again
move the border and the "business" logic you write to today will
tomorrow be regarded as low-level data access logic.
> The scenario that I outlined in my previous example is real. I've
> worked with companies that are moving from centralized databases to
> document based storage.
Can you give a more detailed description of the case?
Fredrik Bertilsson
http://butler.sourceforge.net
.
- Follow-Ups:
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: Michael Feathers
- Re: OOP/OOD Philosophy
- References:
- Re: OOP/OOD Philosophy
- From: Nick Malik [Microsoft]
- Re: OOP/OOD Philosophy
- From: topmind
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: topmind
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Michael Feathers
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Michael Feathers
- Re: OOP/OOD Philosophy
- Prev by Date: Re: OOP/OOD Philosophy
- Next by Date: Re: OOP/OOD Philosophy
- Previous by thread: Re: OOP/OOD Philosophy
- Next by thread: Re: OOP/OOD Philosophy
- Index(es):
Relevant Pages
|