Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #4126
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe01.iad.POSTED!8ad76e89!not-for-mail |
|---|---|
| From | Arved Sandstrom <asandstrom3minus1@eastlink.ca> |
| User-Agent | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: "Program to an interface" - When to break a design pattern |
| References | <9dt5s6dalhetgfe99qs92c02hf0dbas44e@4ax.com> <2psjssq4zj.fsf@shell.xmission.com> <ipv16s$gho$1@dont-email.me> <2poc3gq3p2.fsf@shell.xmission.com> <ipv2ej$ka6$1@dont-email.me> <u157s65pd8cep5ag1rvtqh7qo67dj3icdl@4ax.com> <iq17dt$c54$1@dont-email.me> <c3lbs6pc00he19u3ru6asfpdicu552pvu0@4ax.com> <iq4rj8$j2j$1@dont-email.me> <JLnxp.68858$yp3.49687@newsfe09.iad> <iq68h6$7og$1@dont-email.me> <whAxp.19939$Ot6.2301@newsfe15.iad> <iq6l21$vuh$1@dont-email.me> <iqbihl$40p$1@dont-email.me> <Ysjyp.13$jc2.12@newsfe11.iad> <cP6dnVE0G8HAV1fQnZ2dnUVZ_rCdnZ2d@earthlink.com> <iqeii4$3i9$1@dont-email.me> |
| In-Reply-To | <iqeii4$3i9$1@dont-email.me> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Lines | 37 |
| Message-ID | <68Tzp.4573$4d6.3276@newsfe01.iad> (permalink) |
| X-Complaints-To | abuse@newsgroups-download.com |
| NNTP-Posting-Date | Sun, 15 May 2011 16:25:38 UTC |
| Organization | Public Usenet Newsgroup Access |
| Date | Sun, 15 May 2011 13:25:35 -0300 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4126 |
Show key headers only | View raw
On 11-05-11 02:55 PM, Daniele Futtorovic wrote: > On 11/05/2011 19:41, Patricia Shanahan allegedly wrote: >> I think some of the trouble might lie in the ambiguity, in a Java >> context, of the sentence "Program to an interface.". >> >> Meaning 1: Users of some module (in the widest sense) should depend only >> on what is declared and specified about the module, not on direct >> knowledge of how it is currently implemented. >> >> Meaning 2: Java programs should depend only in Java interface types to >> represent what is declared and specified about a module for the use of >> its callers. >> >> I am very strongly in favor of meaning 1 of "Program to an interface.". >> Everything any user of a module needs to know about it should be >> declared and/or specified as part of its interface (in the general >> sense), and using code should depend only on what is declared and >> specified. > > Absolutely. Isn't the wording "program to a contract rather to an > implementation" also in use? I find that a much better one, because it > doesn't evoke Java interfaces. > Fervent agreement. Especially if we're talking about OOP languages that actually have "interface" constructs. The first time I had this concept introduced to me, "program to an interface", I hadn't even started using Java because only about a dozen people at Sun were using Java. :-) So "interface" to me means "contract". In fact it was a bit of a surprise to me when I discovered, in the course of doing intensive research during this thread, that many Java eminences really do mean "Java interface" specifically when they advocate "program to an interface". This is quite a strong principle - stronger (or, shall we say, more selective) than the general one. AHS
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar
Re: "Program to an interface" - When to break a design pattern Zapanaz <http://joecosby.com/code/mail.pl@foo.com> - 2011-05-05 23:25 -0700
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-06 18:25 +0200
Re: "Program to an interface" - When to break a design pattern Zapanaz <http://joecosby.com/code/mail.pl@foo.com> - 2011-05-07 16:26 -0700
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-08 03:28 +0200
Re: "Program to an interface" - When to break a design pattern Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-08 00:05 -0300
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-08 16:15 +0200
Re: "Program to an interface" - When to break a design pattern Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-08 14:20 -0300
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-08 19:48 +0200
Re: "Program to an interface" - When to break a design pattern markspace <-@.> - 2011-05-10 07:36 -0700
Re: "Program to an interface" - When to break a design pattern Jim Janney <jjanney@shell.xmission.com> - 2011-05-10 13:04 -0600
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-10 21:31 +0200
Re: "Program to an interface" - When to break a design pattern Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-10 20:01 -0300
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-11 19:14 +0200
Re: "Program to an interface" - When to break a design pattern Patricia Shanahan <pats@acm.org> - 2011-05-11 10:41 -0700
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-11 19:55 +0200
Re: "Program to an interface" - When to break a design pattern Lew <noone@lewscanon.com> - 2011-05-11 16:42 -0400
Re: "Program to an interface" - When to break a design pattern Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2011-05-11 23:34 +0200
Re: "Program to an interface" - When to break a design pattern "John B. Matthews" <nospam@nospam.invalid> - 2011-05-12 00:51 -0400
Re: "Program to an interface" - When to break a design pattern Lew <noone@lewscanon.com> - 2011-05-12 00:58 -0400
Re: "Program to an interface" - When to break a design pattern Tom Anderson <twic@urchin.earth.li> - 2011-05-12 20:08 +0100
Re: "Program to an interface" - When to break a design pattern Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-05-15 13:25 -0300
csiph-web