Talk:Software design pattern: Difference between revisions

Content deleted Content added
Vanderjoe (talk | contribs)
PrimeBOT (talk | contribs)
m Task 24: elink template removal following a TFD
 
(20 intermediate revisions by 16 users not shown)
Line 1:
{{WikiProject Computingbanner shell|class=StartC|importance1=High}}
{{WikiProject ComputerComputing science|classimportance=StartHigh |software=y |software-importance=High |science=y |science-importance=High}}
{{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 | &nbsp;<fontspan colorstyle="color:#005000;">dm</fontspan><fontspan colorstyle="color:#555555;">yers</fontspan><fontspan colorstyle="color:#005000;">t</fontspan><fontspan colorstyle="color:#555555;">urnbull</fontspan>&nbsp; ]] ⇒ [[User_talk:Dmyersturnbull|talk]] 03:59, 4 June 2009 (UTC)
: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 | &nbsp;<fontspan colorstyle="color:#005000;">dm</fontspan><fontspan colorstyle="color:#555555;">yers</fontspan><fontspan colorstyle="color:#005000;">t</fontspan><fontspan colorstyle="color:#555555;">urnbull</fontspan>&nbsp; ]] ⇒ [[User_talk:Dmyersturnbull|talk]] 06:58, 10 July 2009 (UTC)
 
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 101 ⟶ 103:
 
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 167 ⟶ 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 180 ⟶ 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">—&nbsp;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 237 ⟶ 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 257 ⟶ 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 280 ⟶ 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 296 ⟶ 309:
 
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">—&nbsp;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 ==
Line 303 ⟶ 317:
 
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 ==
Line 331 ⟶ 347:
 
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. ==
Line 359 ⟶ 439:
<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)