<joshua.krinsky@gmail.com> wrote:
>> I was wondering if anyone knew where I could find a design patterns
>> library for Java. I've been tasked with creating or finding one and
>> I've had no luck searching Google.
> I have the feeling that you're misinterpreting the purpose of design
> patterns. The amount of common code from a design pattern that could be
[quoted text clipped - 13 lines]
> your own designs, rather than producing stilted designs that are driven
> by your choice of patterns.
What Chris said. Beyond that, explain to whomever "tasked" you with this that
the idea is fundamentally incorrect. Design patterns are concepts, not code.
Consider an analogy. In natural languages like English or Tagalog there are
grammatical patterns like "verb" and "sentence". Those patterns manifest
differently in different circumstances; there aren't necessarily preset
"grammatical patterns" in those languages. There are instead an infinitude of
language expressions that manifest those patterns.
Your task is analogous to creating a compendium of grammatical patterns for a
natural language as expressions in that language. You would have to create a
comprehensive set of all possible expressions in that language, clearly not
feasible.
-- Lew
thejtk@gmail.com - 13 Mar 2007 18:30 GMT
> <joshua.krin...@gmail.com> wrote:
> >> I was wondering if anyone knew where I could find a design patterns
[quoted text clipped - 33 lines]
>
> -- Lew
What about ACE in C++? It has classes that provide patterns. An
example would be the Reactor pattern [p.179 Pattern Oriented Software
Architecture Vol.2] implementation in ACE [p.39 C++ Network
Programming Vol.2]. This is the sort of thing I was talking about
(although I'm not looking for a Java version of ACE). If it is
possible to have a library of patterns in C++, shouldn't it be
possible in Java?
joshua.krinsky@gmail.com - 13 Mar 2007 18:33 GMT
> <joshua.krin...@gmail.com> wrote:
> >> I was wondering if anyone knew where I could find a design patterns
[quoted text clipped - 32 lines]
>
> -- Lew
What about ACE in C++? It has classes that provide patterns. An
example would be the Reactor pattern [p.179 Pattern Oriented Software
Architecture Vol.2] implementation in ACE [p.39 C++ Network
Programming Vol.2]. This is the sort of thing I was talking about
(although I'm not looking for a Java version of ACE). If it is
possible to have a library of patterns in C++, shouldn't it be
possible in Java?
Mark Jeffcoat - 13 Mar 2007 20:38 GMT
> What about ACE in C++? It has classes that provide patterns. An
> example would be the Reactor pattern [p.179 Pattern Oriented Software
[quoted text clipped - 3 lines]
> possible to have a library of patterns in C++, shouldn't it be
> possible in Java?
What about ACE? It "implements many core patterns for
concurrent communication software." Good for it. So does
java.util.concurrent.*. I'll be happy to declare it a
pattern library.
Spring provides much support for MVC, Inversion of Control,
Data Mapper, and many more. Very much a pattern library.
log4j implements Neil Harrison's Diagnostic Logger pattern,
and is (deservedly) nearly ubiquitous in the the server
programming world.
java.util.Iterator is a perfectly decent implementation
of the Iterator pattern. Also fairly common in Java
programs.
Maybe you could ask for something more specific?
(If I were tasked with finding a "pattern library in
Java" by someone who obviously didn't know what he was
talking about, I'd be tempted to show up at the next
meeting with a copy of Spring and go home early.)

Signature
Mark Jeffcoat
Austin, TX