Re: Decouple SQL queries from class in OOP design
- From: Robert C. Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Fri, 25 Nov 2005 09:59:34 -0600
On 12 Nov 2005 04:14:15 -0800, "frebe"
<fredrik_bertilsson@xxxxxxxxxxx> wrote:
>> Speed of test execution - the faster they run, the more likely we run
>> them, the more likely we write them, the more code coverage happens.
>
>When a test starts, I assume you in some way have to load the test data
>from disk into memory. The only difference is that the file system is
>touched at test startup. So I don't think there are very much speed to
>gain. And I am not sure that speed of test execution is so important
>that it should force us to do decoupling in the application. If
>decoupling should be done, there must be more significant arguments but
>speed of test execution.
1. Don't underestimate the power of fast tests. When tests are fast,
people will run them. When they are slow, they won't. When people
run the tests frequently, fewer errors creep into the system.
Developer feel free to make changes and improve the code. The sun
shines, and life is beautiful.
2. Forcing the tests to run decoupled from the database has the
secondary effect of forcing you to decouple your application from the
database. This is just good design. However, when coupled with the
unit tests, it is good design that is tested and enforced.
-----
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
.
- References:
- Decouple SQL queries from class in OOP design
- From: Hongyu
- Re: Decouple SQL queries from class in OOP design
- From: H. S. Lahman
- Re: Decouple SQL queries from class in OOP design
- From: Hongyu
- Re: Decouple SQL queries from class in OOP design
- From: Phlip
- Re: Decouple SQL queries from class in OOP design
- From: frebe
- Re: Decouple SQL queries from class in OOP design
- From: Andrew McDonagh
- Re: Decouple SQL queries from class in OOP design
- From: frebe
- Decouple SQL queries from class in OOP design
- Prev by Date: Re: more dimensional method like a query...
- Next by Date: Re: Decouple SQL queries from class in OOP design
- Previous by thread: Re: Decouple SQL queries from class in OOP design
- Next by thread: Re: Decouple SQL queries from class in OOP design
- Index(es):
Relevant Pages
|