mirror of
https://github.com/JakubVojvoda/design-patterns-cpp.git
synced 2025-12-16 20:37:05 +03:00
update READMEs
This commit is contained in:
@@ -19,9 +19,9 @@ objects).
|
||||
- [Bridge], implementation of an object
|
||||
- [Composite], structure and composition of an object
|
||||
- [Decorator], responsibilities of an object without subclassing
|
||||
- [Façade], todo
|
||||
- [Flyweight], todo
|
||||
- [Proxy], todo
|
||||
- [Façade], interface to a subsystem
|
||||
- [Flyweight], storage costs of objects
|
||||
- [Proxy], how an object is accessed (its location)
|
||||
- Behavioral Patterns
|
||||
- [Chain of Responsibility], todo
|
||||
- [Command], todo
|
||||
|
||||
11
facade/README.md
Normal file
11
facade/README.md
Normal file
@@ -0,0 +1,11 @@
|
||||
## Fa<46>ade
|
||||
|
||||
Provide a unified interface to a set of interfaces in a subsystem. Facade
|
||||
defines a higher-level interface that makes the subsystem easier to use.
|
||||
|
||||
### When to use
|
||||
|
||||
* you want to provide a simple interface to a complex subsystem
|
||||
* there are many dependencies between clients and the implementation classes of an abstraction
|
||||
* you want to layer your subsystems, use a facade to define an entry point to each subsystem level
|
||||
|
||||
12
flyweight/README.md
Normal file
12
flyweight/README.md
Normal file
@@ -0,0 +1,12 @@
|
||||
## Flyweight
|
||||
|
||||
Use sharing to support large numbers of fine-grained objects efficiently.
|
||||
|
||||
### When to use
|
||||
|
||||
* when all of the following are true
|
||||
* an application uses a large number of objects
|
||||
* storage costs are high because of the sheer quantity of objects
|
||||
* most object state can be made extrinsic
|
||||
* many groups of objects may be replaced by relatively few shared objects once extrinsic state is removed
|
||||
* the application doesn't depend on object identity
|
||||
7
proxy/README.md
Normal file
7
proxy/README.md
Normal file
@@ -0,0 +1,7 @@
|
||||
## Proxy
|
||||
|
||||
Provide a surrogate or placeholder for another object to control access to it.
|
||||
|
||||
### When to use
|
||||
|
||||
* whenever there is a need for a more versatile or sophisticated reference to an object than a simple pointer
|
||||
Reference in New Issue
Block a user