mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-10 17:04:01 +02:00
Change index.rst to README.rst
remove all pattern's README.md
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
# Strategy
|
||||
|
||||
## Terminology:
|
||||
|
||||
* Context
|
||||
* Strategy
|
||||
* Concrete Strategy
|
||||
|
||||
## Purpose
|
||||
|
||||
To separate strategies and to enable fast switching between them. Also this pattern is a good alternative to inheritance (instead of having an abstract class that is extended).
|
||||
|
||||
## Examples
|
||||
|
||||
* sorting a list of objects, one strategy by date, the other by id
|
||||
* simplify unit testing: e.g. switching between file and in-memory storage
|
||||
|
||||
## UML Diagram
|
||||
|
||||

|
Reference in New Issue
Block a user