Skip to content

Commit 0bddb1b

Browse files
authored
Add Design Patterns in Developer guides (#76)
* developer-guides: Add design-patterns to Developer Guides * developer-guides: Split design-patterns into 4 pages * developer-guides: Remove reStructuredText related warnings * developer-guides: Add image as relative link in design-patterns
1 parent f2f10be commit 0bddb1b

File tree

6 files changed

+2455
-0
lines changed

6 files changed

+2455
-0
lines changed
12.8 KB
Loading
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
Design Patterns
2+
================
3+
4+
5+
.. image:: assets/design-patterns.png
6+
:alt: Design Patterns For Humans
7+
8+
--------------
9+
10+
.. raw:: html
11+
12+
<p align="center">
13+
14+
🎉 Ultra-simplified explanation to design patterns! 🎉
15+
16+
.. raw:: html
17+
18+
</p>
19+
20+
.. raw:: html
21+
22+
<p align="center">
23+
24+
A topic that can easily make anyone’s mind wobble. Here I try to make
25+
them stick in to your mind (and maybe mine) by explaining them in the
26+
simplest way possible.
27+
28+
.. raw:: html
29+
30+
</p>
31+
32+
--------------
33+
34+
🚀 Introduction
35+
----------------
36+
37+
Design patterns are solutions to recurring problems; **guidelines on how
38+
to tackle certain problems**. They are not classes, packages or
39+
libraries that you can plug into your application and wait for the magic
40+
to happen. These are, rather, guidelines on how to tackle certain
41+
problems in certain situations.
42+
43+
Design patterns are solutions to recurring problems; guidelines on
44+
how to tackle certain problems
45+
46+
Wikipedia describes them as
47+
48+
In software engineering, a software design pattern is a general
49+
reusable solution to a commonly occurring problem within a given
50+
context in software design. It is not a finished design that can be
51+
transformed directly into source or machine code. It is a description
52+
or template for how to solve a problem that can be used in many
53+
different situations.
54+
55+
⚠️ Be Careful
56+
-------------
57+
58+
- Design patterns are not a silver bullet to all your problems.
59+
- Do not try to force them; bad things are supposed to happen, if done
60+
so. Keep in mind that design patterns are solutions **to** problems,
61+
not solutions **finding** problems; so don’t overthink.
62+
- If used in a correct place in a correct manner, they can prove to be
63+
a savior; or else they can result in a horrible mess of a code.
64+
65+
..
66+
67+
Also note that the code samples below are in Vala, however this
68+
shouldn’t stop you because the concepts are same anyways. Plus the
69+
**support for other languages is underway**.
70+
71+
Types of Design Patterns
72+
------------------------
73+
74+
- :doc:`Creational </developer-guides/design-patterns/01-00-creational-design-patterns>`
75+
- :doc:`Structural </developer-guides/design-patterns/02-00-structural-design-patterns>`
76+
- :doc:`Behavioral </developer-guides/design-patterns/03-00-behavioral-design-patterns>`
77+
78+
.. toctree::
79+
:glob:
80+
:maxdepth: 1
81+
:numbered:
82+
83+
design-patterns/*

0 commit comments

Comments
 (0)