Re: Programming to an Interface
- From: Robert Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Sun, 28 May 2006 13:17:32 -0500
On 2006-05-17 08:55:51 -0500, ram@xxxxxxxxxxxxxxxxxx (Stefan Ram) said:
As an exercise of style, I asked myself: How could I remove
all dependencies on concrete types from the following
algorithm and express it using solely interfaces?
Entertaining.
My rule of thumb is that I feel very compfortable depending on a concrete class that is not going to change. String, for example, is not going to change very often; so I don't mind using it. On the other hand, the classes that I am in the midst of designing and building are changing all the time. So I often build interfaces for those classes to protect me from those changes.
--
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 |
.
- References:
- Programming to an Interface
- From: GoogleEyeJoe
- Programming to an Interface
- Prev by Date: Re: Programming to an Interface
- Next by Date: Re: Searching OO Associations with RDBMS Persistence Models
- Previous by thread: Re: Programming to an Interface
- Next by thread: How to optimize actors catalog? (UML)
- Index(es):