Use headings instead of bold text in index.md #238

This commit is contained in:
Jeroen Meulemeester
2016-01-03 21:14:30 +01:00
parent b6beffec2e
commit 3d642cdad7
66 changed files with 373 additions and 233 deletions

View File

@ -9,22 +9,24 @@ tags:
- Difficulty-Beginner
---
**Intent:** Enforces a behaviour like sharing the same state amongst all instances.
## Intent
Enforces a behaviour like sharing the same state amongst all instances.
![alt text](./etc/monostate.png "MonoState")
**Applicability:** Use the Monostate pattern when
## Applicability
Use the Monostate pattern when
* The same state must be shared across all instances of a class.
* Typically this pattern might be used everywhere a Singleton might be used. Singleton usage however is not transparent, Monostate usage is.
* Monostate has one major advantage over singleton. The subclasses might decorate the shared state as they wish and hence can provide dynamically different behaviour than the base class.
**Typical Use Case:**
## Typical Use Case
* the logging class
* managing a connection to a database
* file manager
**Real world examples:**
## Real world examples
Yet to see this.