Re: Programming to an Interface
- From: Robert Martin <unclebob@xxxxxxxxxxxxxxxx>
- Date: Sun, 28 May 2006 12:46:55 -0500
On 2006-05-14 02:46:57 -0500, Laurent Bossavit <laurent@xxxxxxxxxxxxxxxxxxxx> said:
I think the point here is that one designs the interface first and then the implementation.
Whoever coined the phrase "Program to an interface" must have meant something else; otherwise they would have said "Program the interface first." From the start of this thread I've been wondering about the significance of phrasing it that way, program *to* an interface.
Any ideas ?
Laurent
I've always taken it to be a restatement of the Dependency Inversion Principle. When you call a method, call it on an interface or an abstract class, not on a concrete class.
--
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
- Re: Programming to an Interface
- From: Patrick May
- Re: Programming to an Interface
- From: GoogleEyeJoe
- Re: Programming to an Interface
- From: H. S. Lahman
- Re: Programming to an Interface
- From: Laurent Bossavit
- Programming to an Interface
- Prev by Date: Re: Programming to an Interface
- Next by Date: Re: Programming to an Interface
- Previous by thread: Re: Programming to an Interface
- Next by thread: Re: Programming to an Interface
- Index(es):
Relevant Pages
|
|