Re: OO vs. RDB challenge
From: Michal Kleczek (kleks2_at_wp.pl)
Date: 03/25/05
- Next message: Mr Frank: "Re: Factory Design Pattern and Select Case"
- Previous message: Matthias Hofmann: "Re: Designing my finite state machine"
- In reply to: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Next in thread: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Reply: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Reply: frebe: "Re: OO vs. RDB challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Mr Frank: "Re: Factory Design Pattern and Select Case"
- Previous message: Matthias Hofmann: "Re: Designing my finite state machine"
- In reply to: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Next in thread: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Reply: Alfredo Novoa: "Re: OO vs. RDB challenge"
- Reply: frebe: "Re: OO vs. RDB challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|