Skip to content

Commit 2d65557

Browse files
authored
Fix the broken links of design patterns post
1 parent 9471f1c commit 2d65557

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

_posts/2022-09-20-a-seamingly-simple-question-what-are-design-patterns.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ image: assets/images/3-1.jpg
77
---
88
In the software industry, there are a range of topics you hear debates about in almost every company. I believe the
99
design patterns story is one of them. You can find countless posts, articles, and Quora/Stackoverflow answers acting
10-
for or against them. For instance, the other day, I came across [this old Quora question](https://medium.com/r/?url=https%3A%2F%2Fwww.quora.com%2FWhy-do-programmers-talk-less-about-design-patterns-now-Which-patterns-if-any-are-still-valuable):
10+
for or against them. For instance, the other day, I came across [this old Quora question](https://www.quora.com/Why-do-programmers-talk-less-about-design-patterns-now-Which-patterns-if-any-are-still-valuable):
1111

1212
> "Why do programmers talk less about design patterns now? Which patterns (if any) are still valuable?"
1313
14-
The author meant object-oriented design patterns, or the 23 patterns introduced in the [Gang of Four book](https://medium.com/r/?url=https%3A%2F%2Fwww.google.com%2Fbooks%2Fedition%2FDesign_Patterns%2FtmNNfSkfTlcC%3Fhl%3Den%26gbpv%3D1%26dq%3DDesign%2BPatterns%3A%2BElements%2Bof%2BReusable%2BObject-Oriented%2BSoftware%26printsec%3Dfrontcover%23v%3Donepage%26q%3DDesign%2520Patterns%253A%2520Elements%2520of%2520Reusable%2520Object-Oriented%2520Software%26f%3Dfalse),
14+
The author meant object-oriented design patterns, or the 23 patterns introduced in the [Gang of Four book](https://www.google.com/books/edition/Design_Patterns/tmNNfSkfTlcC?hl=en&gbpv=1&dq=Design+Patterns:+Elements+of+Reusable+Object-Oriented+Software&printsec=frontcover#v=onepage&q=Design%20Patterns:%20Elements%20of%20Reusable%20Object-Oriented%20Software&f=false),
1515
and most of the people who answered the question assumed that this was the case. However, 'the design pattern' is a term
1616
that some people use instead of 'object-oriented design patterns'-so don't get shocked when you come across the strange
1717
statement: "design patterns are dead".
@@ -34,7 +34,7 @@ A design pattern reminds me that many software engineers have already faced the
3434
particular way for several reasons. There's probably a rationale behind it and it gives us the ability to see the
3535
problem from a different perspective, even if we don't intend to follow that pattern.
3636

37-
Let's look at a paragraph from the [GoF famous book](https://medium.com/r/?url=https%3A%2F%2Fwww.google.com%2Fbooks%2Fedition%2FDesign_Patterns%2FtmNNfSkfTlcC%3Fhl%3Den%26gbpv%3D1%26dq%3DDesign%2BPatterns%3A%2BElements%2Bof%2BReusable%2BObject-Oriented%2BSoftware%26printsec%3Dfrontcover%23v%3Donepage%26q%3DDesign%2520Patterns%253A%2520Elements%2520of%2520Reusable%2520Object-Oriented%2520Software%26f%3Dfalse)'s introduction:
37+
Let's look at a paragraph from the [GoF famous book](https://www.google.com/books/edition/Design_Patterns/tmNNfSkfTlcC?hl=en&gbpv=1&dq=Design+Patterns:+Elements+of+Reusable+Object-Oriented+Software&printsec=frontcover#v=onepage&q=Design%20Patterns:%20Elements%20of%20Reusable%20Object-Oriented%20Software&f=false)'s introduction:
3838

3939
> "We all know the value of design experience. How many times have you had design déjà vu-that feeling that you've
4040
> solved a problem before but not knowing exactly where or how? If you could remember the details of the previous
@@ -48,19 +48,19 @@ Now let's dive into some fundamental concepts and definitions.
4848

4949
## What do patterns mean?
5050
What is a pattern? The pattern concept is not something specific to our industry. Other disciplines and industries such
51-
as architecture, economics, etc. also apply this concept. Let's see the pattern definitions by [Christopher Alexander](https://medium.com/r/?url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FChristopher_Alexander),
51+
as architecture, economics, etc. also apply this concept. Let's see the pattern definitions by [Christopher Alexander](https://en.wikipedia.org/wiki/Christopher_Alexander),
5252
a leading authority in architecture:
5353

54-
> "Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution." ([Alexander, 1979](https://medium.com/r/?url=https%3A%2F%2Fwww.google.com%2Fbooks%2Fedition%2FThe_Timeless_Way_of_Building%2FH6CE9hlbO8sC%3Fhl%3Den%26gbpv%3D1%26dq%3DThe%2BTimeless%2BWay%2Bof%2BBuilding%26printsec%3Dfrontcover%23v%3Donepage))
54+
> "Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution." ([Alexander, 1979](https://www.google.com/books/edition/The_Timeless_Way_of_Building/H6CE9hlbO8sC?hl=en&gbpv=1&dq=The+Timeless+Way+of+Building&printsec=frontcover#v=onepage))
5555
>
56-
> "Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice." ([Alexander, 1977](https://medium.com/r/?url=https%3A%2F%2Fwww.google.com%2Fbooks%2Fedition%2FA_Pattern_Language%2FFTpxDwAAQBAJ%3Fhl%3Den%26gbpv%3D1%26dq%3DPattern%2Blanguage%26printsec%3Dfrontcover%23v%3Donepage%26q%26f%3Dfalse))
56+
> "Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice." ([Alexander, 1977](https://www.google.com/books/edition/A_Pattern_Language/FTpxDwAAQBAJ?hl=en&gbpv=1&dq=Pattern+language&printsec=frontcover#v=onepage&q&f=false))
5757
5858
Now let's see what patterns mean in the software industry:
5959

6060
> "A pattern for software architecture describes a particular recurring design problem that arises in specific design
6161
> contexts, and presents a well-proven generic scheme for its solution. The solution scheme is specified by describing
6262
> its constituent components, their responsibilities and relationships, and the ways in which they collaborate."
63-
> ([BMRSS, 96](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
63+
> ([BMRSS, 96](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
6464
6565
Based on the above definitions, we can consider a pattern as a triad of context, problem, and solution combined with
6666
the relationship among them. However, it's a broad concept and can be applied to different scales and abstraction
@@ -83,13 +83,13 @@ programming language is or what framework is being used.
8383

8484
> "An architectural pattern expresses a fundamental structural organisation schema for software systems. It provides a
8585
> set of predefined subsystems, specifies their responsibilities, and includes rules and guidelines for organising the
86-
> relationships between them." ([BMRSS, 96](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
86+
> relationships between them." ([BMRSS, 96](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
8787
8888
On the other hand, we have some patterns in the lowest level of abstraction called idioms which address both design and
8989
implementation. Idioms are language-specific meaning that an idiom in language A is irrelevant in language B.
9090

9191
> "An idiom is a low-level pattern specific to a programming language. An idiom describes how to implement particular
92-
> aspects of components or the relationships between them using the features of the given language." ([BMRSS, 96](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
92+
> aspects of components or the relationships between them using the features of the given language." ([BMRSS, 96](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
9393
9494
However, there are still some other patterns that occur between those mentioned above regarding the scale and
9595
abstraction level, that's where design patterns come in.
@@ -99,16 +99,16 @@ So let's review the definition of the remaining category:
9999

100100
> "A design pattern provides a scheme for refining the subsystems or components of a software system, or the
101101
> relationships between them. It describes a commonly-recurring structure of communicating components that solves a
102-
> general design problem within a particular context." ([BMRSS, 96](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
102+
> general design problem within a particular context." ([BMRSS, 96](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
103103
104104
Design patterns are medium-scale, meaning they're neither highly abstract like architectural patterns, nor coupled to
105105
programming languages, like idioms. Applying design patterns doesn't affect the software system structure, but it does
106106
impact the subsystems' architecture and its smaller components.
107107

108-
Now, let's discuss the following statement (extracted from the same [reference](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
108+
Now, let's discuss the following statement (extracted from the same [reference](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
109109
containing a crucial fact about design patterns:
110110

111-
> "They tend to be independent of a particular programming language or programming paradigm." ([BMRSS, 96](https://medium.com/r/?url=https%3A%2F%2Fbooks.google.nl%2Fbooks%2Fabout%2FPattern_Oriented_Software_Architecture_A.html%3Fid%3Dj_ahu_BS3hAC%26printsec%3Dfrontcover%26source%3Dkp_read_button%26hl%3Den%26redir_esc%3Dy%23v%3Donepage%26q%26f%3Dfalse))
111+
> "They tend to be independent of a particular programming language or programming paradigm." ([BMRSS, 96](https://books.google.nl/books/about/Pattern_Oriented_Software_Architecture_A.html?id=j_ahu_BS3hAC&printsec=frontcover&source=kp_read_button&hl=en&redir_esc=y#v=onepage&q&f=false))
112112
113113
According to the pattern category we previously addressed in this article, we'd better rephrase it like this:
114114

@@ -120,7 +120,7 @@ programming paradigms. They're likely responses to the deficiencies of paradigms
120120
object-oriented design patterns described in the GoF book, most of which are not genuine concerns in the functional
121121
programming paradigm. But the opposite is also true as the design patterns have different contexts.
122122

123-
As you can see in the [following image](https://medium.com/r/?url=https%3A%2F%2Fblog.ploeh.dk%2F2012%2F05%2F25%2FDesignpatternsacrossparadigms%2F),
123+
As you can see in the [following image](https://blog.ploeh.dk/2012/05/25/Designpatternsacrossparadigms/),
124124
different paradigms could share design patterns, but we're not going to address this topic as it's beyond the scope of
125125
this article.
126126

0 commit comments

Comments
 (0)