Re: Retrieving unnecessary data
- From: topmind <topmind@xxxxxxxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 11:36:54 -0800 (PST)
On Feb 21, 11:16 am, Robert Martin <uncle...@xxxxxxxxxxxxxxxx> wrote:
On 2008-02-20 11:08:37 -0600, topmind <topm...@xxxxxxxxxxxxxxxx> said:
Robert Martin wrote:
On 2008-02-19 13:14:31 -0600, topmind <topm...@xxxxxxxxxxxxxxxx> said:
Evidence that OO makes testing easier?
Function f destroys the world when it is called. Function y calls
function f. How do I test function y? I hide f behind a polymorphic
interface called IF. I implement a fake version of f called MF. I
pass MF to y and tell y to do it's thing. Then I ask MF if f was
called. The world was not destroyed, and yet I know that y will call f.
One can also write a dummy stub function f,
Sure, and sometimes that would be a good choice. Other times the
polymorphic interface would be a good choice.
or use a dummy database
(dummy world) for testing.
Ah, now that's an interesting concept.
It's common in the industry.
You mean a database that, for
all intents and purposes, looks like a production database but isn't.
You mean one that can be substutited for the production database
according to the LSP. You mean...an object?
I think that's a very good idea.
I suppose under a wide view of "OOP" it can be considered such. Then
again, one can view everything as relational also if one wants to.
LISP fans view everything as S-expressions. Everything is everything,
woo hooo!
--
Robert C. Martin (Uncle Bob) | email: uncle...@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
-T-
.
- Follow-Ups:
- Re: Retrieving unnecessary data
- From: Robert Martin
- Re: Retrieving unnecessary data
- References:
- Retrieving unnecessary data
- From: ShaneLM
- Re: Retrieving unnecessary data
- From: H. S. Lahman
- Re: Retrieving unnecessary data
- From: ShaneLM
- Re: Retrieving unnecessary data
- From: Robert Martin
- Re: Retrieving unnecessary data
- From: topmind
- Re: Retrieving unnecessary data
- From: Robert Martin
- Re: Retrieving unnecessary data
- From: topmind
- Re: Retrieving unnecessary data
- From: Robert Martin
- Retrieving unnecessary data
- Prev by Date: Re: Why is Object Oriented so successfull
- Next by Date: Re: Why is Object Oriented so successfull
- Previous by thread: Re: Retrieving unnecessary data
- Next by thread: Re: Retrieving unnecessary data
- Index(es):