Design Patterns in U See Book
Design Patterns in U See Book
Dr Milan Milanovic
Microsoft MVP
Table Of Contents
Structural Pa�erns 18
Behavioral Pa�erns 33
3
Design Pa�ern Types
4
-
-
-
-
-
5
-
- -
6
-
- s
7
Don’t fall into the Design Pa�erns trap
8
-
9
Crea�onal Design Pa�erns
Singleton
an anti-
10
11
-
Factory method
12
13
-
14
15
)
16
Other excit
Abstratct Factory:
Prototype:
17
Structural Pa�erns
Adapter
18
19
sage -
20
21
22
-
23
24
25
Decorator
26
27
28
T
Facade Pa�ern
Usage: It provides a simplified interface to a complex subsystem.
Real-world example: Let's say we are visiting a hotel. We need various services - ordering
room service, booking spa appointments, requesting housekeeping. Instead of contacting
each department individually, you call the front desk. The front desk acts as a facade, hiding
the complexity of the underlying systems. They take your request, communicate with the
relevant department (kitchen, spa, housekeeping), and deliver the service, making
everything seem effortless. You don't need to know how each department works; the facade
provides a simplified interface to access them all.
The remark about usage: Facades have the potential to transform into god objects
connected to every application class.
29
30
An example in C#
31
-
implementa�on in C#.
32
Behavioral Pa�erns
Facade Pa�ern
- -
33
34
35
Observer
sage
36
37
38
Command
39
40
41
State
It c
42
43
44
Template method
45
46
47
48
How To Select The Correct Design Pa�ern
49
check here.
50
51
Resources to learn more
-
-
52