Re: OO vs. RDB challenge

From: Michal Kleczek (kleks2_at_wp.pl)
Date: 03/25/05


Date: Fri, 25 Mar 2005 14:25:18 +0100

Hi,

Alfredo Novoa wrote:
[snip]
> An object always has behavior.
>
>
>>such as Loan.Approve() that involves more then
>>just updating a field.
>
>
> It would be a lot better to do this:
>
> update Loans set Approved = true where Id = ...
>
> The Loan class and the Approve() method are superfluous.
>

IMO it's worse:
you have business logic (loan.aprove())
and search/find logic (where id=...) mixed together.
It can change for differnet reasons
(i.e. pk changed) so it should be separated.

Regards
Michal



Relevant Pages

  • Re: Short term traffic increases from post to these sites
    ... next time I'm updating some stuff (don't like to see PR0 for a friends ... I like giving as much as receiving also. ...
    (alt.internet.search-engines)
  • Re: libicui18n.so.36 not found, required by "evolution"
    ... Would you be so kind as to explain your reluctance to update your ... The number of potential programs that need updating seems ... My system was updated yesterday and I'm trying to resolve the issues that arose from the updating. ...
    (freebsd-questions)
  • Re: A new low for HP...
    ... <SNIP> ... > I'm a bit wary of updating the ROM now...in case it gets worse. ... Prev by Date: ...
    (comp.sys.hp48)
  • Re: Updating ports
    ... > and I was told updating latest XFree86 might help. ... Here's my cvsupfile that works fine: ...
    (freebsd-newbies)
  • Re: libicui18n.so.36 not found, required by "evolution"
    ... Would you be so kind as to explain your reluctance to update your ... The number of potential programs that need updating seems ... My system was updated yesterday and I'm trying to resolve the issues that arose from the updating. ...
    (freebsd-questions)