Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #15004

Re: How is this "pattern" called?

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: How is this "pattern" called?
Date 2012-06-02 09:25 -0700
Organization albasani.net
Message-ID <jqdeor$8c2$1@news.albasani.net> (permalink)
References (5 earlier) <z_CdncDz595QXSvSnZ2dnUVZ_tOdnZ2d@earthlink.com> <54jdr7164mceis033e8f7amqb3qhjdfv9r@4ax.com> <4fb8590f$0$295$14726298@news.sunsite.dk> <jpbdfd$2rk$1@news.albasani.net> <MPG.2a30254f3d3ca719989704@202.177.16.121>

Show all headers | View raw


Wanja Gayk wrote:
> noone@lewscanon.com says...
>> Arne Vajhøj wrote:
>>> Gene Wirchenko wrote:
>>>> With the amount of noise over patterns though, you would think
>>>> that many people need the patterns. For me, supporting an in-house
>>>> application, there is no or little need.
>>>
>>> Or you have not realized the need.
>>
>> Or both of you are looking at it from the wrong perspective.
>>
> [..]
>> The argument is over "patterns" in the GoF sense, a highly bureaucratized,
>> overly-verbose and religiously canonical set of labels and formats to describe
>> them. But even amidst all the sturm und drang over the latter kind of
>> patterns, they provide value in a common terminology and informal use. So when
>> we discuss Visitor or Singleton, we all know what we mean. ("We" being
>> competent programmers. One occasionally sees posters here who are less
>> knowledgeable.)
>
> I guess that's one of the most common misconceptions. Some people seem
> to think that patterns are used, because they are considered cool and
> fancy. While in the real world you use any certain pattern because and
> only when it solves your problem.
>
> I have seldomly seen a visitor pattern in the wild, because there are
> not so many occasions where it's so considerably better than something
> that is easier to understand to make it worth using.
> But the strategy pattern is used everywhere, everytime you use a
> Comparator for example, simply because it solves a very common problem
> very well.

Someone who has actually read up on patterns will find that every pattern 
document includes the motivation or scenarios for which the pattern applies. 
No pattern is claimed to be universally applicable, or offered as "cool", but 
always as relevant for a particular type of situation.

Part of knowing about patterns is learning to discern when one is useful and 
when it isn't.

Any competent programmer who claims not to use patterns is lying, or at best 
being disingenuous. One might not use them literally in the GoF style, but 
they are there. As others in this thread have pointed out, if you program for 
Swing or use almost anything in the standard API, you're using patterns even 
if only those imposed on you by the API writer (e.g., MVC). Patterns in the 
general sense are at the heart of effective programming. (Patterns in the 
formal, strictly GoF-imitative sense not so much.)
-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: How is this "pattern" called? Jim Janney <jjanney@shell.xmission.com> - 2012-05-18 10:03 -0600
  Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-18 10:50 -0700
    Re: How is this "pattern" called? markspace <-@.> - 2012-05-18 12:20 -0700
      Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-18 14:13 -0700
        Re: How is this "pattern" called? Patricia Shanahan <pats@acm.org> - 2012-05-18 14:35 -0700
          Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-18 15:29 -0700
            Re: How is this "pattern" called? Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 22:38 -0400
              Re: How is this "pattern" called? Lew <noone@lewscanon.com> - 2012-05-20 11:34 -0700
                Re: How is this "pattern" called? Arne Vajhøj <arne@vajhoej.dk> - 2012-05-20 14:59 -0400
                Re: How is this "pattern" called? Patricia Shanahan <pats@acm.org> - 2012-05-20 12:03 -0700
                Re: How is this "pattern" called? markspace <-@.> - 2012-05-20 13:19 -0700
                Re: How is this "pattern" called? Wanja Gayk <brixomatic@yahoo.com> - 2012-05-30 14:32 +0200
                Re: How is this "pattern" called? Lew <noone@lewscanon.com> - 2012-06-02 09:25 -0700
              Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-20 20:40 -0700
                Re: How is this "pattern" called? Wanja Gayk <brixomatic@yahoo.com> - 2012-05-30 14:33 +0200
          Re: How is this "pattern" called? Wanja Gayk <brixomatic@yahoo.com> - 2012-05-30 14:32 +0200
        Re: How is this "pattern" called? markspace <-@.> - 2012-05-18 15:28 -0700
        Re: How is this "pattern" called? Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 22:37 -0400
          Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-20 20:43 -0700
            Re: How is this "pattern" called? Lew <noone@lewscanon.com> - 2012-05-21 00:09 -0700
              Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-21 10:04 -0700
            Re: How is this "pattern" called? Wanja Gayk <brixomatic@yahoo.com> - 2012-05-30 23:58 +0200
    Re: How is this "pattern" called? Arne Vajhøj <arne@vajhoej.dk> - 2012-05-19 22:33 -0400
      Re: How is this "pattern" called? Gene Wirchenko <genew@ocis.net> - 2012-05-20 20:44 -0700
        Re: How is this "pattern" called? Lew <noone@lewscanon.com> - 2012-05-21 00:11 -0700

csiph-web