Re: OOP/OOD Philosophy
- From: Robert C. Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Tue, 12 Jul 2005 14:43:43 -0500
On 12 Jul 2005 12:02:40 -0700, "frebe"
<fredrik_bertilsson@xxxxxxxxxxx> wrote:
>>>If you have an XML file with customers and every customer should have
>>>an unique name. Is the logic for checking the name "persistence" logic
>>>or "business" logic?
>>It is business logic. If we ran the entire system in RAM without any
>>persistence, the customers would still have to be unique.
>
>But if you use a RDBMS, that logic would not be handled by the
>application at all, except from possibly formatting an error message.
The fact that the RDB has it's own need for uniqueness, does not mean
that the application must depend on the RDB for that uniqueness. The
application can provide the uniqueness, and then map it to the RDB.
>This what I am trying to show, trying to classify and separate logic as
>"business" logic or "persistence" logic, is very fuzzy.
The fact that there are sometimes accidental overlaps, does not mean
the boundary is fuzzy. Any function that the application requires,
and that the RDB accidentally supplies (like uniqueness) should be
carefully partitioned so that the application does not know that the
RDB supplies it.
-----
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716
"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
.
- Follow-Ups:
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- References:
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- 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
|
Loading