Re: OOP/OOD Philosophy



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
.



Relevant Pages

  • Re: OOP/OOD Philosophy
    ... >>> that the application must depend on the RDB for that uniqueness. ... >proponents and RDBMS proponents. ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)
  • Re: OOP/OOD Philosophy
    ... >> that the application must depend on the RDB for that uniqueness. ... and rules may, or may not, align to the application. ... "The aim of science is not to open the door to infinite wisdom, ...
    (comp.object)
  • RE: GTECH, Lotteries and OpenVMS
    ... I'd like to see him discontinue RDB. ... > all those customers to the Oracle suite. ... Oracle's public statement is to *not* to kill ...
    (comp.os.vms)
  • Re: Interbase on VMS (was Re: "Oracle RDB" licensing question)
    ... >> money than they received from Oracle. ... >> Another mistake was not ensuring that the deal with Oracle included an Rdb ... VMS customers. ... DBMS ISVs ignore them at their peril. ...
    (comp.os.vms)
  • Re: OOP/OOD Philosophy
    ... frebe wrote: ... >> that the application must depend on the RDB for that uniqueness. ... proponents and RDBMS proponents. ...
    (comp.object)

Loading