Content deleted Content added
m Signing comment by 61.4.76.7 - "→Extraneous examples: " |
|||
(36 intermediate revisions by 25 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject
{{WikiProject Computer science |importance=High}}
}}
{{archivebox|auto=yes}}
Line 77 ⟶ 79:
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 [[http://www.google.com/webhp?hl=en&btnG=Google+Search#hl=en&q=%22fundamental+pattern%22&btnG=Google+Search&aq=f&oq=%22fundamental+pattern%22&aqi=&fp=1mZ_-PL2Zjc|Google 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 [[Design pattern (computer science)|this page]]; and it doesn't list inheritance or encapsulation.
[[ User:dmyersturnbull | <
:If there are no objections, I'll place the ''neologism'' template:
:{{neologism}}
:for the reason cited above. Also, if its contradiction to [[Fundamental pattern]] is not resolved, I think adding contradict-other is warranted:
:{{Contradict-other|[[Fundamental pattern]]}}
:[[ User:dmyersturnbull | <
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.
Line 95 ⟶ 97:
::: Err, I guess I don't agree with [[User:dmyersturnbull|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. [[User:Bpringlemeir|Bpringlemeir]] ([[User talk:Bpringlemeir|talk]]) 01:48, 16 July 2010 (UTC)
::: "Encapsulation and inheritance are general directions for structuring code..." In other words, patterns?! This looks like the very definition of a pattern! [[User:GeneCallahan|GeneCallahan]] ([[User talk:GeneCallahan|talk]]) <span style="font-size: smaller;" class="autosigned"> — Preceding [[Wikipedia:Signatures|undated]] comment added 18:15, 23 December 2014 (UTC)</span><!--Template:Undated--> <!--Autosigned by SineBot-->
== Why is Factory not listed? ==
It has its own page on wikipedia as being a creational pattern. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/208.127.236.194|208.127.236.194]] ([[User talk:208.127.236.194|talk]]) 15:00, 14 August 2009 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
: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. [[Special:Contributions/82.26.250.60|82.26.250.60]] ([[User talk:82.26.250.60|talk]]) 22:26, 6 September 2023 (UTC)
: (Resolved, Factory method now listed)
Line 165 ⟶ 172:
:::: 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. [[User:KaiSeun|KaiSeun]] ([[User talk:KaiSeun|talk]]) 07:25, 16 February 2012 (UTC)
{{reflist-talk}}
== Paragraph sounds like an ad ==
Line 178 ⟶ 187:
Blackboard is not a design pattern but an communication strategy
I suggest to remove this <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/80.148.12.242|80.148.12.242]] ([[User talk:80.148.12.242|talk]]) 09:28, 7 April 2011 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
Link to Entity component system <!-- Template:Unsigned IP --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/80.78.218.36|80.78.218.36]] ([[User talk:80.78.218.36#top|talk]]) 10:05, 16 March 2019 (UTC)</small> <!--Autosigned by SineBot-->
== Criticism - Newness ==
Line 201 ⟶ 212:
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.--[[User:Demonkoryu|Demonkoryu]] ([[User talk:Demonkoryu|talk]]) 09:53, 8 August 2011 (UTC)
: '''Support''' removal. An [[programming idiom]] is something less versatile than a software design pattern.--[[User:Sae1962|Sae1962]] ([[User talk:Sae1962|talk]]) 08:58, 29 November 2016 (UTC)
==design patterns ''vs'' algorithms==
Line 234 ⟶ 246:
: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."<ref>GOF page 2</ref> (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. – [[User:Rfrankla|rfrankla]] ([[User talk:Rfrankla|talk]]) 09:34, 21 April 2014 (UTC)
:: 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. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/68.183.37.167|68.183.37.167]] ([[User talk:68.183.37.167|talk]]) 14:32, 28 May 2014 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
{{reflist-talk}}
== Proactor ==
Line 254 ⟶ 268:
* [http://jt.dev.java.net/files/documents/5553/150311/designPatterns.pdf Messaging Design Pattern]{{dead link|date=August 2012}} Published in the 17th conference on Pattern Languages of Programs (PLoP 2010).
* [http://media.wiley.com/product_data/excerpt/28/04700590/0470059028.pdf On Patterns and Pattern Languages] by Buschmann, Henney, and Schmidt
* {{tlp|dmoz|Computers/Programming/Methodologies/Patterns_and_Anti-Patterns/|Patterns and Anti-Patterns}}
* [http://www.doc.ic.ac.uk/~np2/patterns/scripting/ Patterns for Scripted Applications]
* [http://perfectjpattern.sourceforge.net/ PerfectJPattern Open Source Project] Design Patterns library that aims to provide full or partial componentized version of all known Patterns in Java.
Line 277 ⟶ 291:
* [http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns/2707195#2707195 List of design patterns in the Java API]
* [http://w3sdesign.com/ The Design Patterns Memory]
{{reflist-talk}}
== External link to w3sdesign.com ==
Line 284 ⟶ 300:
What do others think about it?
[[User:Serv49|Serv49]] ([[User talk:Serv49|talk]]) 18:16, 23 October 2014 (UTC)
I have added the link.
[[User:Serv49|Serv49]] ([[User talk:Serv49|talk]]) 10:05, 6 November 2014 (UTC)
== Languish? ==
"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." [[User:GeneCallahan|GeneCallahan]] ([[User talk:GeneCallahan|talk]]) 18:34, 23 December 2014 (UTC)
: 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". <!-- Template:Unsigned IP --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/171.20.64.8|171.20.64.8]] ([[User talk:171.20.64.8#top|talk]]) 12:33, 16 November 2023 (UTC)</small> <!--Autosigned by SineBot-->
== IVSR ==
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 [[WP:PROMO|self promote]]? If so, it needs to be removed. Otherwise it might be useful to explain what IVSR is. <small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/46.44.173.1|46.44.173.1]] ([[User talk:46.44.173.1|talk]]) 12:02, 24 February 2015 (UTC)</small><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== History ==
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.[[Special:Contributions/216.96.76.54|216.96.76.54]] ([[User talk:216.96.76.54|talk]]) 13:11, 20 July 2015 (UTC)
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." [[Special:Contributions/85.76.82.209|85.76.82.209]] ([[User talk:85.76.82.209|talk]]) 07:31, 9 August 2019 (UTC)
== Definition ==
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
[[User:Shkaboinka|Shkaboinka]] ([[User talk:Shkaboinka|talk]]) 16:30, 9 March 2016 (UTC)
== Additional external link ==
I have added an external link to
GoF Design Patterns Open Online Learning (w3sdesign.com). Do you agree?
[[User:Serv49|Serv49]] ([[User talk:Serv49|talk]]) 18:21, 20 October 2016 (UTC)
== FOG heavy ==
<blockquote>
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.
</blockquote>
I find that, as a single sentence, a bit heavy for the lead. — [[user:MaxEnt|MaxEnt]] 02:37, 4 November 2016 (UTC)
== Copypaste / plagiarism ==
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. —[[User:Ynhockey|Ynhockey]] <sup>([[User talk:Ynhockey|Talk]])</sup> 15:15, 26 August 2017 (UTC)
: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. ~[[User:Kvng|Kvng]] ([[User talk:Kvng|talk]]) 00:04, 22 September 2018 (UTC)
::Actually, the book was [https://www.amazon.ca/Head-First-Design-Patterns-Brain-Friendly/dp/0596007124 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 [https://books.google.ca/books?redir_esc=y&id=6oHuKQe3TjQC&q=Provide+an+interface+for+creating+families+of+related+or+dependent+objects+without+specifying+their+concrete+classes.#v=snippet&q=Provide%20an%20interface%20for%20creating%20families%20of%20related%20or%20dependent%20objects%20without%20specifying%20their%20concrete%20classes.&f=false 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. [[User:Ahiijny|Ahiijny]] ([[User talk:Ahiijny|talk]]) 19:55, 13 October 2018 (UTC)
::My subjective impressions:
::* 0 = exact match
::* 0.1 = very close match
::* 0.5 = somewhat different
::* 1 = pretty different
::{| class="wikitable"
|-
! 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"
|} [[User:Ahiijny|Ahiijny]] ([[User talk:Ahiijny|talk]]) 19:55, 13 October 2018 (UTC)
== Moved the Types section to Talk page. ==
The Types section has no relevant information and is redundant (having a broken link (4)). <br>
The Classification section includes all relevant information.<br>
See also the above "types of design patterns" vs "classification" section.
<br>
<br>
The original Types section:<br>
<br>
Design patterns reside in the ___domain of modules and interconnections. At a higher level there are [[Architectural pattern (computer science)|architectural patterns]] which are larger in scope, usually describing an overall pattern followed by an entire system.<ref name = "R.C.Martin">{{cite web
| url = http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf
| title = Design Principles and Design Patterns
| last = Martin
| first = Robert C.
| authorlink = Robert Cecil Martin
| date = 2000}}</ref>
There are many types of design patterns, for instance <ref>https://sourcemaking.com/design_patterns</ref><ref>{{Cite web|url=http://www.oodesign.com/|title=Design Patterns {{!}} Object Oriented Design|last=|first=|date=|website=www.oodesign.com|archive-url=|archive-date=|dead-url=|access-date=2017-04-08}}</ref>
;[[Algorithm strategy pattern]]s: Addressing concerns related to high-level strategies describing how to exploit application characteristics on a computing platform.{{Clarify|date=March 2015}}
;[[Computational design pattern]]s: Addressing concerns related to key computation identification.<ref>{{Cite web|title = Category:Computational Thinking Patterns – Scalable Game Design wiki|url = http://sgd.cs.colorado.edu/wiki/Category:Computational_Thinking_Patterns|website = sgd.cs.colorado.edu|accessdate = 2015-12-26}}</ref><ref>{{Cite web|title = Introduction to Software Engineering/Architecture/Design Patterns – Wikibooks, open books for an open world|url = https://en.wikibooks.org/wiki/Introduction_to_Software_Engineering/Architecture/Design_Patterns|website = en.wikibooks.org|accessdate = 2015-12-26}}</ref>
;[[Execution pattern]]s: 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 pattern]]s: Addressing concerns related to implementing source code to support
:#program organization, and
:#the common data structures specific to parallel programming.
;[[Structural design pattern]]s: Addressing concerns related to global structures of applications being developed.<br>
<br>
[[User:Vanderjoe|Vanderjoe]] ([[User talk:Vanderjoe|talk]]) 16:02, 6 September 2017 (UTC)
{{reflist-talk}}
== External links modified ==
Hello fellow Wikipedians,
I have just modified one external link on [[Software design pattern]]. Please take a moment to review [[special:diff/814171373|my edit]]. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit [[User:Cyberpower678/FaQs#InternetArchiveBot|this simple FaQ]] for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20080229011119/http://developer.yahoo.com/ypatterns/ to http://developer.yahoo.com/ypatterns/
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
{{sourcecheck|checked=false|needhelp=}}
Cheers.—[[User:InternetArchiveBot|'''<span style="color:darkgrey;font-family:monospace">InternetArchiveBot</span>''']] <span style="color:green;font-family:Rockwell">([[User talk:InternetArchiveBot|Report bug]])</span> 07:33, 7 December 2017 (UTC)
== Title and scope ==
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? [[User:Rp|Rp]] ([[User talk:Rp|talk]]) 14:11, 11 November 2022 (UTC)
== Additional Historical informatoiin ==
I've just clarified some information about Christopher Alexander at the start of the History section.
I've also added a reference to his Keynote Speech to the 1996 OOPSLA Convention. This provides more detail about the history of a Pattern Language in Architecture and how it had evolved more recently. In particular Christopher Alexander suggested significant collaboration opportunities between Software Design and the Architectural Pattern Language work he had helped pioneer. [[User:CuriousMarkE|CuriousMarkE]] ([[User talk:CuriousMarkE|talk]]) 23:35, 24 August 2024 (UTC)
|