Talk:Software design pattern

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

The title[edit]

As stated in the first paragraph, design pattern is more software engineering artifact than computer science. Or choose the third option: computation. — Preceding unsigned comment added by Kejia (talkcontribs) 18:16, 12 December 2010 (UTC)[reply]

Making the list its own page[edit]

Maybe in the next couple of days unless someone reasonably disagrees. --Daydreamer302000 (talk) 11:29, 8 June 2009 (UTC)[reply]

I think Design Patterns should include examples of all language, which is very useful in order to understand the pattern.—Preceding unsigned comment added by 207.46.92.16 (talkcontribs) 02:19, 10 June 2009

Extraneous examples[edit]

The many pages for specific Design Patterns have a chronic excess of examples. Many pages are more than 80% example; at least one pattern has examples in 13 languages with a total of 16 examples! While some examples are different in important ways between families of languages (such as strongly-typed versus dynamically-typed), I have a strong feeling that language advocates are adding me-too examples that detract from explaining the particular pattern. I think Java is probably the best example language for OO design patterns since Java examples won't be cluttered with memory-management code but are strongly typed, so it is clear what inherits what. Full disclosure: My own personal languages of choice are C++ and Python and I am not too familiar with Java. I've changed a few algorithm examples from pseudocode to Python when a working Python example could be almost as easy to understand as pseudocode. However, for OO design patterns, I really think a widely-used strongly-typed garbage-collected language is most appropriate, and that leaves me with Java.

If people feel strongly about having examples in every possible language, I would argue that the examples should be forked off onto separate pages or moved to wikibooks. But certainly 16 examples in 13 languages is not the best way to describe the singleton pattern. —Ben FrantzDale (talk) 13:47, 8 April 2009 (UTC)[reply]

I agree with you. Feel free to remove examples that do not add to the explanation of the pattern. --Antonielly (talk) 13:53, 8 April 2009 (UTC)[reply]
say hello to the world — Preceding unsigned comment added by 61.4.76.7 (talk) 03:37, 29 October 2014 (UTC)[reply]
I went ahead and was bold, linking all edits back to this discussion. I'm sure I pissed off a few people, but this really had to be done. I left one example as PHP5 because it was the only concise example. I erased hours and hours of work. Again, if people want to dig it back out, wikibooks is probably a good place for it. Wikipedia should be the tip of the iceburg and shouldn't dwell on language-specifics on these topics unless the specifics are very relevant to the patterns. There are still some pages with long lists of links to implementations in various languages. —Ben FrantzDale (talk) 00:11, 9 April 2009 (UTC)[reply]
I also agree, so many code examples added nothing. Also, this is coherent with Wikipedia is not a How-to guide policy. --Enric Naval (talk) 03:45, 9 April 2009 (UTC)[reply]

I just noticed that this has apparently pissed off at least one unregistered user. It wasn't me, but I agree that we should create a place for it withough bombing all that content out of existence. Thanks. 122.29.47.35 (talk) 11:07, 13 April 2009 (UTC) Sorry, I was referring to the Singleton article specifically, but yeah, it applies to all I guess. 122.29.47.35 (talk) 11:08, 13 April 2009 (UTC)[reply]

That would be 61.115.196.46, whose reversion carries the comment "There was an idiot who removed the examples for all languages other than Java. I had depended on this to create singleton for my projects and only to find they were deleted by one idiot.". But it doesn't change the fact that Wikipedia is not a programming textbook. The purpose of these articles should be to explain what design patterns are in general and to explain the specific patterns in general terms, not to provide libraries of source code for cut and paste usage. I have undone their reversion. RossPatterson (talk) 11:31, 13 April 2009 (UTC)[reply]
Seriously. If someone depended upon the examples for their project, they certainly would have understood the Java version and applied it in the language of choice. Unless 61.115.196.46 is just copy/pasting from Wikipedia instead of programming ;-) —Ben FrantzDale (talk) 11:35, 13 April 2009 (UTC)[reply]
Be bold and move them to Wikibooks! If you do, add links to them here. —Ben FrantzDale (talk) 11:35, 13 April 2009 (UTC)[reply]
If you wanted to be bold enough to delete all the examples, you should have also moved them to wiki books. I understand your motivation, but you shouldn't do the destructive work without doing the constructive work in turn. — Preceding unsigned comment added by 192.35.35.34 (talk) 23:59, 12 August 2011 (UTC)[reply]
I'm user 201.253.239.87 now(dynamic IP), I've undone BenFrantzDale's Visitor Pattern revision (Reason: "One is not enough for me (but shorter/minimalistic exampleS would be)" in response to BenFrantzDale's "Removed C++ and D examples. One is enough." and later I found this discussion. I think examples implemented in a language are good for learning, both the language(it shows features about it) and the pattern. I think the examples should have been moved elsewhere(eg. wikibooks) and linked to before removal. —Preceding undated comment added 05:28, 15 April 2009 (UTC).
I agree wikibooks is probably the best place for these. Knowing the pattern quite well I can't really see any difference between the examples, each has CarElementVisitor and CarElement interfaces/structs and a few classes implementing these. The rest is just baggage which obscure the pattern. I've now copied the examples to wikibooks at [1]. --Salix (talk): 09:05, 15 April 2009 (UTC)[reply]
Great, thanks! That seems like it should keep everyone happy and avoid discarding peoples' hard work. —Ben FrantzDale (talk) 13:21, 15 April 2009 (UTC)[reply]

On the Visitor pattern page, i have moved the wikibooks template to the example section, and changed its text to more clearly indicate that there are more examples there. Is it okay to have all the affected pages edited in a similar way? -- Jokes Free4Me (talk) 19:53, 15 April 2009 (UTC)[reply]

Yes, I'd say so. That looks pretty good to me. RossPatterson (talk) 22:38, 15 April 2009 (UTC)[reply]
Looks good. I just rephrased the link to say "Visitor implementations in various languages" which reads better to my eyes. I started the same for Singleton, moving all examples I erased earlier. Great progress! —Ben FrantzDale (talk) 00:47, 16 April 2009 (UTC)[reply]
Can some wise mind add well documented critisms? —Preceding unsigned comment added by 192.193.221.141 (talk) 14:59, 29 April 2009 (UTC)[reply]
Adding link to wikibooks on Observer pattern page —Preceding unsigned comment added by Ariadie (talkcontribs) 08:49, 12 May 2009 (UTC)[reply]

Just added POSA2[edit]

Hi there, I just added

D, Schmidt (2000). Pattern-Oriented Software Architecture, Volume 2: Patterns for Concurrent and Networked Objects. John Wiley & Sons. ISBN 0-471-60695-2. {{cite book}}: Unknown parameter |coauthors= ignored (|author= suggested) (help)

I believe many of the cuncurrent patterns in the table come from this book, it would be nice to add a column for that. Cheers. 122.29.47.35 (talk) 11:22, 13 April 2009 (UTC)[reply]

Done 123.224.241.172 (talk) 14:48, 25 April 2009 (UTC)[reply]
Hmm, it would be better to have just POSA and then write e.g. "1" or "2" or "no" in the column. I just added MVC and according to Amazon book search, MVC is in POSA1. Stachelfisch (talk) 20:46, 3 July 2009 (UTC)[reply]

Fundamental pattern category[edit]

I'm not sure about considering encapsulation, inheritance, and exceptions to be design patterns. Encapsulation and inheritance are general directions for structuring code more than they are patterns, re-usable elements of software. They are philosophies more than patterns or blueprints. Patterns (not limited to computer science) must be unanimously recognizable. For example, an architectural design's use of the golden ratio is non-disputable. I've never seen "fundamental patterns" used anywhere outside of that cited college lecture presentation and the book it cites, Barbara Liskov's "Program Development in Java". It strikes me that the author wished to coin a new term; perhaps someone who read it can provide another opinion. My [query] yielded few relevant results. Has the term 'fundamental pattern' gained community acceptance or popular usage? And if so, do—and why do—encapsulation and inheritance qualify? Any thoughts? Also, the page Fundamental pattern lists Proxy pattern, Facade pattern, and Composite pattern; all three of which are listed as structural patterns in this page; and it doesn't list inheritance or encapsulation.  dmyersturnbull  talk 03:59, 4 June 2009 (UTC)[reply]

If there are no objections, I'll place the neologism template:
for the reason cited above. Also, if its contradiction to Fundamental pattern is not resolved, I think adding contradict-other is warranted:
 dmyersturnbull  talk 06:58, 10 July 2009 (UTC)[reply]

I would remove everything referring to "fundamental patterns". They simply don't belong. "Design Patterns" (ISBN-10: 0201633612) is 15 years old and surely one of the seminal works. It's still in print. It catalogs ~15 patterns from factory to vistor. That's what the term normally encompasses and what wikipedia should document.

How to distinguish between a pattern and something like inheritance? There's no direct support for a pattern in any language. That's *why* they're patterns: because many programmers, facing diverse problems in a variety of languages, hit upon similar ways -- patterns -- of addressing them.

I disagree with the other cautionary note, though, that suggests criticism should be integrated into the document. The "other school of thought" should have its own section to allow main section to make its case.

jklowden talk Tue Jul 14 21:36:24 EDT 2009 —Preceding undated comment added 01:37, 15 July 2009 (UTC).[reply]
There are source defining similar concepts. See chapter 2.3.1 of Meta-Compilation for C++ [2] which also provide further references. I believe dmyersturnbull has many excellent points worth pursuing. As more people study a concept deeper understanding is found. Just because an seminal work refers to something doesn't mean a field can not progress beyond it. Other wise the argument would be mute as we would all program in MIX. Bpringlemeir (talk) 01:41, 16 July 2010 (UTC)[reply]
Err, I guess I don't agree with dmyersturnbull (and apparently I can not read). Anyways, the reference above is worth looking at if you are pursuing this. There is literature where people try to dissect the universal nature of a pattern. As with the multiple language example above, an excess of things named patterns can dilute as well. Bpringlemeir (talk) 01:48, 16 July 2010 (UTC)[reply]
"Encapsulation and inheritance are general directions for structuring code..." In other words, patterns?! This looks like the very definition of a pattern! GeneCallahan (talk) — Preceding undated comment added 18:15, 23 December 2014 (UTC)[reply]

Why is Factory not listed?[edit]

It has its own page on wikipedia as being a creational pattern. —Preceding unsigned comment added by 208.127.236.194 (talk) 15:00, 14 August 2009 (UTC)[reply]

A plain factory is usually considered different from a factory method no? Considering it's so important, it seem's reasonable to list all three, or just list factory and have the subtypes listed on its respective wiki page. 82.26.250.60 (talk) 22:26, 6 September 2023 (UTC)[reply]
(Resolved, Factory method now listed)

Should Multiton be listed?[edit]

As noted on the Multiton "talk" page, Multiton seems to be interchangeable with the "Flyweight Pattern" - the code examples are interchangeable. It seems as if it's just an alternate name for the same pattern, put into a different category. — Preceding unsigned comment added by 38.70.1.35 (talk) 04:20, 5 September 2012 (UTC)[reply]

Enterprise Integration Patterns[edit]

These patterns belong here and should also have their own page in wiki! What do you think? more here: Integration Patterns

Azbarcea talk Fri Jun 11 09:55:24 UTC 2010 —Preceding undated comment added 08:56, 11 June 2010 (UTC).[reply]

Criticism section[edit]

An anon removed the cricicism section [3] iwith the comment

(Moved valid information out of a criticisms section into the rest of the article. In the process, removed information that was the result of the writer's personal ignorance.)

The remove material is

Criticism[edit]

In the field of computer science, there exist some criticisms regarding the concept of design patterns.

Workarounds for missing language features[edit]

Users of dynamic programming languages have discussed many design patterns as workarounds for the limitations of languages such as C++ and Java.[1]

For instance, the Visitor pattern need not be implemented in a language that supports multimethods. The purpose of Visitor is to add new operations to existing classes without modifying those classes. In C++, a class is declared as a syntactic structure with a specific and closed set of methods. In a language with multimethods, such as Common Lisp, methods for a class are outside of the class structure, and one may add new methods without modifying it.

Similarly, the Decorator pattern amounts to implementing dynamic delegation, as found in Common Lisp, Objective-C, Self and JavaScript.

Many patterns imply object-orientation or more generally mutable state, and so are meaningless in functional programming style, in which data is immutable or treated as such. For example, the Iterator pattern is a generalisation of 'for' loops, an inherently imperative notion.

Does not differ significantly from other abstractions[edit]

Some authors [who?] allege that design patterns don't differ significantly from other forms of abstraction[citation needed], and that the use of new terminology (borrowed from the architecture community) to describe existing phenomena in the field of programming is unnecessary. The Model-View-Controller paradigm is cited as an example of a "pattern" that predates the concept of "design patterns" by several years.[2] It is further argued by some[who?] that the primary contribution of the Design Patterns community (and the Gang of Four book) was the use of Alexander's pattern language as a form of documentation; a practice that is often ignored in the literature. [citation needed]

should any of this be restored?--Salix (talk): 08:09, 4 November 2010 (UTC)[reply]

I'd say, go ahead and re-include this section. Perhaps it's not the best sourced right now, but there are pieces of criticism published out there; let's hope more links will be added soon enough. One thing comes to my mind, Paul Graham's

For example, in the OO world you hear a good deal about "patterns". I wonder if these patterns are not sometimes evidence of case (c), the human compiler, at work.

(from http://www.paulgraham.com/icad.html); perhaps the discussion at http://www.c2.com/cgi/wiki?AreDesignPatternsMissingLanguageFeatures is a good start too. Dexen (talk) 16:50, 19 November 2010 (UTC)[reply]
As it currently stands the criticism section is based on irgnorance; it criticises the 'concept' of patterns. That is like criticising the 'concept' of solutions or answers to questions or formula. (Software/Design/Architecture) Patterns are solutions documentation in relativity consistent way. Individual patterns may be 'poor' or 'wrong' but that makes them anti-patterns or poor solutions, it doesn't make the concept of patterns wrong, if anything it justifies them further. MartinSpamer (talk) 07:22, 27 November 2011 (UTC)[reply]
Your phrasing seems to conform to the criticism that "design patterns" are hardly new. "That is like criticising the 'concept' of solutions or answers to questions or formula.". What /isn't/ a solution or answer? (Software) engineers as I understand them apply knowledge to solve problems. It follows then there have always been "design patterns" as long as there have been (software) engineers, and thus "design patterns" existed long before the Gang of Four. But maybe you mean something more specific than just knowledge. But then again, maybe not. A solution, good or bad, addresses some problem. Documentation records this solution in a form that can be transmitted to someone else. A "relatively consistent way" could in the extreme mean totally consistent, like some kinds of logic, or something totally free-formed, like some kinds of art (and yes, people have been inspired to create and document a solution based on an encounter with art). If these are "(Software/Design/Architecture) Patterns", then I claim first you are correct that "it doesn't make the concept of patterns wrong", for how can a concept be wrong?, and second, that one part of the criticism section is actually valid because the concept /of a concept/ is hardly new (though for a twist, our /concept/ of a concept has changed over time). In other words, the concept of "design pattern" seems to me indistinguishable from "knowledge", and could thus be stated as: knowledge is documentation of solutions in a relativity consistent way, and pretty much state the same thing. It's quite telling that you put all the adjectives to "patterns" in brackets, suggesting you don't mean just software design patterns, but patterns in general.
(GeorgePaci incidentally stated the same thing about another of Christopher Alexander's ideas, that "QWAN" was a replacement for "good" (… '"That design is good" and rewrites them as "That design has QWAN"'). The same thing here, where "design pattern" replaces "pattern" (or "concept")).
So that I'm not accused of something I didn't say, let me be clear that I too support the concept of documenting solutions in a relatively consistent way (and thus am against "inconsistency", meaning something like "undisciplined", or "ignores previous knowledge (re: patterns) without reason"). However, I don't think all this talk of design patterns has really added much, and perhaps nothing at all, compared to what we would have done had we not borrowed from Alexander's ideas. If he was the first architect to document (repeated) solutions, then good for him. If the Gang of Four was the first to document (software) engineers' knowledge, then good for them. Yet, I don't think that could be the case. That's not to say our ways of recording knowledge have never changed – they have. Rather, (design) patterns might better be thought of (and defined as, one step towards a good /concept/) as documentation to solutions in a /more/ consistent way, more consistent than whatever came before. On this view, a "design pattern" really just looks like a form of organized knowledge, as opposed to being scattered across a million brains and databases, much like Wikipedia is a form of organized knowledge compared to the millions of sources that is (supposedly) cites.
The bottom line is that I would drop all this design pattern talk because there already are burgeoning fields that talk about knowledge. For instance, cognitive scientists would talk about "mental representations", and could ask questions that design pattern people could not, like are some mental representations more "difficult" than others, such as, do they take up more processing time? This could then have relevance to software engineering because it could tell us, somewhat, if some "design patterns" give us more trouble than others). In other words, software design patterns (Gang of Four, Alexander's ideas, etc.) to me seem disconnected from the rest of our knowledge. This is a bad thing. If anything it justifies them less.
tl;dr: software design patterns have become indistinguishable from knowledge or concepts, and all talk of it can be done away with, but what it refers to cannot. KaiSeun (talk) 07:25, 16 February 2012 (UTC)[reply]

References

  1. ^ Peter Norvig, in Design Patterns in Dynamic Programming, discusses the triviality of implementing various patterns in dynamic languages. Norvig, Peter (1998-03-17). "Design Patterns in Dynamic Programming". Retrieved 2007-12-29. Norvig and others have described language features that encapsulate or replace various patterns that a C++ user must implement for themselves.
  2. ^ Reenskaug, Trygve. "MVC XEROX PARC 1978-79". Retrieved 2008-06-09.

Paragraph sounds like an ad[edit]

The final paragraph of the history section appears to be an advertisement for SOA Design Patterns. I'm not sure that this book even belongs on the page; it certainly doesn't deserve its own paragraph. EvanKroske (talk) 01:49, 19 November 2010 (UTC)[reply]

New list appearance[edit]

I just refactored the list to remove the gigantic red-block columns that were for books that don't even have a wiki page. One was PoEAA and that only had two patterns. The other was PoSA2, which only had concurrency patterns (and the first two columns had no concurrency patterns). I think what I implemented is the best solution for this, which is 1) to separate out the concurrency patterns into its own table with the primary column being PoSA2, and 2) adding an "Other" column, to list the two references to PoEAA as well as any other books that references that may come along for the patterns that currently have no references. I also changed the blank column cells in the "Other" column to the n/a Template to give a better overall appearance. I hope that these changes are helpful. -- Renesis (talk) 23:11, 17 February 2011 (UTC)[reply]

Pattern List[edit]

Blackboard is not a design pattern but an communication strategy I suggest to remove this —Preceding unsigned comment added by 80.148.12.242 (talk) 09:28, 7 April 2011 (UTC)[reply]

Link to Entity component system — Preceding unsigned comment added by 80.78.218.36 (talk) 10:05, 16 March 2019 (UTC)[reply]

Criticism - Newness[edit]

I don't understand this criticism:

The idea may not be as new as suggested by the authors: for instance the Model-View-Controller paradigm is an example of a "pattern" which predates the concept of "design patterns" by several years.

As far as I know, none of the authors claim that they were the first to create the concept of design patterns. Rather, they claim to be the first to document it explicitly and create a lexicon to talk about them. A citation here would be very useful. —Preceding signed comment added by 67.248.242.179 (talk) 01:43, 20 April 2011 (UTC)[reply]

Patterns are discovered not invented -- Christopher Alexander (Author "A pattern language" and originator of the idea of a pattern language) — Preceding unsigned comment added by 92.40.253.45 (talk) 21:35, 31 October 2011 (UTC)[reply]

What about Asynchronous Completion Token (ACT)?[edit]

I'm just learning this design pattern and I know nothing about it, but it seems to be a standard for handling things in Flex (or some client) that should be processed after completion of a server process.

"The Asynchronous Completion Token design pattern efficiently dispatches processing actions within a client in response to the

completion of asynchronous operations invoked by the client."

Why RAII included in Design Pattern?[edit]

After reading RAII, it doesn't look like an creational pattern. Can we remove/move it from creation pattern secion?

I support the removal. RAII is more exactly programming idiom, not a design pattern.--Demonkoryu (talk) 09:53, 8 August 2011 (UTC)[reply]
Support removal. An programming idiom is something less versatile than a software design pattern.--Sae1962 (talk) 08:58, 29 November 2016 (UTC)[reply]

design patterns vs algorithms[edit]

If a design pattern is a "a general reusable solution to a commonly occurring problem", then in what way(s) does it differ from an algorithm? This article doesn't do much to explain exactly what a design pattern is. A simple example would be a good start. WilliamSommerwerck (talk) 19:13, 7 September 2011 (UTC)[reply]

As a quick answer, I would say that design patterns differ from algorithm in that design patterns solve software engineering problems rather than computer science problems. That is, they are templates for managing complexity that arrives from interaction among software components. There are many ways to implement depth first search, so even though the algorithm may be the same, on implementation may be far preferable from a software-design perspective in terms of software reusability, etc. That's a sketch of an answer, anyway. 20:38, 7 September 2011 (UTC)
Looking up algorithm, it is described as "a finite list of well-defined instructions", I would say that is different enough. Unfortunately, design patterns are an advanced subject and this is partly why explaining them is so difficult. Typically, one or more design patterns may be used in an algorithm solution expressed in a particular computer language. Books are written on the subject.
Like classic Chinese martial arts movies, one needs good kung fu (term), not just basic knowledge of how to move your arms and legs. – rfrankla (talk) 10:42, 21 April 2014 (UTC)[reply]

Creating a new category[edit]

I am concerned with software design patterns for a few month now. One reason is for educational purposes, creating a lecture with Moodle. There are a lot of design patterns, but somehow the ones defined in the Design Patterns book are taught often first. To help those interested in teaching the subject (to themselves, why not?) or who are interested in the history of this subject, I propose to add a category called Category:GoF pattern or something like that so that all 23 patterns are in one category. As the default place, I will add the Design Pattern book article. What is your opinion? Sae1962 (talk) 15:57, 26 July 2012 (UTC)[reply]

Generally support. I'd change the name to Category:Gang of Four design patterns though. This category name should be plural, and spelling things out in full is generally clearer to naive readers.
Also note that if you use the leading colon, you can link to categories without needing the <nowiki> markup. Andy Dingley (talk) 16:08, 26 July 2012 (UTC)[reply]

See Also section[edit]

Design patterns and TRIZ are similar in that they both define solutions to common problems. A see also section might be an interesting side road. — Preceding unsigned comment added by Billegge (talkcontribs) 12:23, 24 October 2012 (UTC)[reply]

delete[edit]

delete

" types of design patterns" vs "classification"[edit]

redundant (but with diffferent types), or just no explanation of the difference? 68.183.23.147 (talk) 23:38, 16 January 2013 (UTC)[reply]

No one has fixed it after more than a year. Any reasonable objection to deleting the "types"?

In Design Patterns/Code Complete - WTF[edit]

Not that I have anything against these references, but why on earth should the presence or not of a particular pattern in these books matter? There are numerous patterns that were identified before and after these which aren't included. This section reads like religion, not software engineering. — Preceding unsigned comment added by 81.129.62.42 (talk) 01:43, 15 September 2013 (UTC)[reply]

Prior to the publication of GOF little was known on the subject. The authors wanted to provide a standard vocabulary for practitioners to communicate their thoughts and ideas. To begin the process they purposely chose "some of the most important design patterns and present them as a catalog."[1] (I'm being informal because this is the talk page). By virtue of the number of copies sold and the acceptance by software engineers of these ideas, these book are the acknowledged references on the subject. – rfrankla (talk) 09:34, 21 April 2014 (UTC)[reply]
I agree - whether a pattern is in some book or another is completely irrelevant. It's like listing birds that are found in one particular field guide. — Preceding unsigned comment added by 68.183.37.167 (talk) 14:32, 28 May 2014 (UTC)[reply]

References

  1. ^ GOF page 2

Proactor[edit]

Should proactor be listed?

delegation pattern[edit]

has its own article, but not listed here?!

External links moved to talk[edit]

Looks like we've created a WP:LINKFARM. I've moved all the links from the article to the list below. Anyone want to go through this mess and see if anything fits WP:EL well enough to include? --Ronz (talk) 17:41, 13 June 2014 (UTC)[reply]

References

External link to w3sdesign.com[edit]

The w3sDesign Patterns website contains encyclopedic and accurate material that is relevant to the understanding of the subject. I would like to add a link to it. What do others think about it? Serv49 (talk) 18:16, 23 October 2014 (UTC)[reply]

I have added the link. Serv49 (talk) 10:05, 6 November 2014 (UTC)[reply]

Languish?[edit]

"Although design patterns have been applied practically for a long time, formalization of the concept of design patterns languished for several years..."

Languished? For several years? I *think* what is meant here is that "Although design patterns have been applied practically for a long time, it was only recently that they were formalized." GeneCallahan (talk) 18:34, 23 December 2014 (UTC)[reply]

Even in 2014, when the original comment here was written, this was not true; formalization of "design patterns" predates the books by some years. They were just not called "design patterns". — Preceding unsigned comment added by 171.20.64.8 (talk) 12:33, 16 November 2023 (UTC)[reply]

IVSR[edit]

In several design patterns the C# examples have been changed to include the text IVSR, e.g. Mediator pattern. What is IVSR? When searching online I don't get any useful results. Could it be that someone is trying to self promote? If so, it needs to be removed. Otherwise it might be useful to explain what IVSR is. — Preceding unsigned comment added by 46.44.173.1 (talk) 12:02, 24 February 2015 (UTC)[reply]

History[edit]

The History section ends with the following claim:"Although design patterns have been applied practically for a long time, formalization of the concept of design patterns languished for several years." The reference given does NOT (as far as I can see from Baroni, et al's .pdf) support the claim. Also, the claim is so vague as to be meaningless. Languished when? between 1700 and 1900? Between 1987 and 1991? Note that Kent Beck's home page (cited in Baroni) at http://c2.com/ppr/about/author/kent.html makes a couple of claims that could verify his contention that he spoke about the use of formal design patterns for building software. But it is certainly not peer reviewed and is imho a dubious claim to primacy (see below); is it sufficiently authoritative to be used as a fact? Seems too self-serving to me (no offense intended). The principle problem I have is that, obviously, patterns have been used in software at least since machine language was invented (since a language IS a group of patterns). (and of course hardware contains at its core a repeated pattern of circuits...) So, unless there is careful definition of the term which distinguishes it from language (and a number of other methods/procedures/venues/abstractions) I don't see how you can identify the start of it (surely some of the software development houses used formal design templates prior to 1987!) other than to claim that the GoF 1995 paper is the "recognized" start, in general. I recommend that sentence be deleted. It serves no real purpose, afaiks.216.96.76.54 (talk) 13:11, 20 July 2015 (UTC)[reply]

User:216.96.76.54 above is correct to postulate that design patterns are older than mentioned in history section of this page. Edsger Dijkstra writes about them in his 1972 paper 'The Humble Programmer'. Quote: "A by-product of these investigations maybe of much greater practical significance, and is, in fact, the basis of my fourth argument. The by-product was the identification of a number of patterns of abstraction that play a vital role in the whole process of composing programs." 85.76.82.209 (talk) 07:31, 9 August 2019 (UTC)[reply]

Definition[edit]

According to the definition given by the HillSide group, the definition given (at the top of the wiki page) of a design pattern is incorrect: http://hillside.net/patterns/50-patterns-library/patterns/222-design-pattern-definition

Note that the HillSide group stands as the governing body of patterns for the software world. Also note the Richard (Dick) Peter Gabriel (aka RPG) (director of the HillSide group, and also known for "worse is better") has analysed the work of Christopher Alexander (from whence patterns came) exhaustively, one example being RPG's book, "Patterns of Software": http://dreamsongs.com/Books.html

Shkaboinka (talk) 16:30, 9 March 2016 (UTC)[reply]

Additional external link[edit]

I have added an external link to GoF Design Patterns Open Online Learning (w3sdesign.com). Do you agree? Serv49 (talk) 18:21, 20 October 2016 (UTC)[reply]

FOG heavy[edit]

Patterns that imply mutable state may be unsuited for functional programming languages, some patterns can be rendered unnecessary in languages that have built-in support for solving the problem they are trying to solve, and object-oriented patterns are not necessarily suitable for non-object-oriented languages.

I find that, as a single sentence, a bit heavy for the lead. — MaxEnt 02:37, 4 November 2016 (UTC)[reply]

Copypaste / plagiarism[edit]

I was just reviewing some design patterns from the book Head First: Design Patterns, and noticed that the descriptions on this page (in the pattern list section) are directly taken from there, word for word. Unfortunately I cannot tend to this now, but believe it should be fixed as soon as possible. —Ynhockey (Talk) 15:15, 26 August 2017 (UTC)[reply]

This article was started in 2003 and was well developed by 2009 when the book was published. It is possible that the book copied Wikipedia. ~Kvng (talk) 00:04, 22 September 2018 (UTC)[reply]
Actually, the book was first published in 2004. But I would suspect that the book is quoting directly from the original GoF book or other more authoritative sources anyway. I did a comparison between the 23 design pattern descriptions in the GoF book and the descriptions in the table in the article, and there are a lot of close matches. (I didn't look at any other sources yet.) I'm not sure how much leeway there is wrt close paraphrasing in this context though, since the GoF definitions are pretty short. Ahiijny (talk) 19:55, 13 October 2018 (UTC)[reply]
My subjective impressions:
  • 0 = exact match
  • 0.1 = very close match
  • 0.5 = somewhat different
  • 1 = pretty different
Category Name GoF Diff Difference from GoF to Wikipedia article
Creational Abstract Factory 0
Builder 0.5 changed "so that" to "allowing" and "can create different representations" to "to create various representations"
Factory Method 0.1 inserted "single"
Prototype 0 + 1 the first 1.5 clauses are an exact match, but everything after that is new
Singleton 0
Structural Adapter 0.1 + 1 very close paraphrasing ("Adapter" → "An adapter", "couldn't" → "could not"), but last sentence is new
Bridge 0.1 changed "so that" to "allowing" and "can vary" to "to vary"
Composite 0
Decorator 0.1 inserted "keeping the same interface"
Facade 0
Flyweight 0.1 changed "fine-grained" to "similar"
Proxy 0
Behavioral Chain of responsibility 0
Command 0.5 changed "thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations" to "thereby allowing for the parameterization of clients with different requests, and the queuing or logging of requests. It also allows for the support of undoable operations."
Interpreter 0
Iterator 0
Mediator 0.1 changed "lets you vary their interaction independently" to "allows their interaction to vary independently"
Memento 0.1 changed "so that" to "allowing" and "can be" to "to be"
Observer 0.5 changed "so that when one object changes state, all its dependents are notified and updated automatically" to "where a state change in one object results in all its dependents being notified and updated automatically"
State 0
Strategy 0
Template method 0
Visitor 0.1 changed "lets you define a new operation" to "lets a new operation be defined"
Ahiijny (talk) 19:55, 13 October 2018 (UTC)[reply]

Moved the Types section to Talk page.[edit]

The Types section has no relevant information and is redundant (having a broken link (4)).
The Classification section includes all relevant information.
See also the above "types of design patterns" vs "classification" section.

The original Types section:

Design patterns reside in the domain of modules and interconnections. At a higher level there are architectural patterns which are larger in scope, usually describing an overall pattern followed by an entire system.[1]

There are many types of design patterns, for instance [2][3]

Algorithm strategy patterns
Addressing concerns related to high-level strategies describing how to exploit application characteristics on a computing platform.[clarification needed]
Computational design patterns
Addressing concerns related to key computation identification.[4][5]
Execution patterns
Which address issues related to lower-level support of application execution, including strategies for executing streams of tasks and for the definition of building blocks to support task synchronization.
Implementation strategy patterns
Addressing concerns related to implementing source code to support
  1. program organization, and
  2. the common data structures specific to parallel programming.
Structural design patterns
Addressing concerns related to global structures of applications being developed.


Vanderjoe (talk) 16:02, 6 September 2017 (UTC)[reply]

External links modified[edit]

Hello fellow Wikipedians,

I have just modified one external link on Software design pattern. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 07:33, 7 December 2017 (UTC)[reply]

Title and scope[edit]

I feel this article suffers from a lack of definition.

The title suggests that design patterns are a general notion in software development. I have only ever seen them as an practice that is specific to object-oriented software, introduced by Gamma et al.'s book. Some design patterns, such as MVC, existed prior to the book, but I've never seen the idea applied to other types of software. If it has been done, and if the term design pattern is actually applied in such cases, they are certainly the exception.

We do have all kinds of established design patterns in software development that aren't tied to object orientation, such as client-server architecture, multi-tier architecture, dataflow architecture and pipelines, message passing, concurrent programming with shared memory and IPC primitives, software threads, software interrupts, etc. etc., but none of these are actually known by the name design pattern, as far as I know. The present article defines the term as if such things are included, and then goes on to discuss exclusively the specific concept introduced by Gamma et al. This is confusing and inconsistent.

Either the article should limit itself to discussing design patterns as known in object-oriented software development, and the title and introductory paragraph should be changed to reflect that; or it should at least start out by discussing them, before continuing to discuss how design patterns are applied in non-object-oriented software (which the present text doesn't even mention the existence of).

Do you agree? Which approach would you prefer? Rp (talk) 14:11, 11 November 2022 (UTC)[reply]