Skip to content

Commit

Permalink
Replace the example of the composite pattern
Browse files Browse the repository at this point in the history
The previous example a little wordy. We can use less code to describe
the composite pattern. Less code allows us to focus on the pattern
self.
  • Loading branch information
toaco committed Aug 16, 2017
1 parent 4934f2c commit b1d7a44
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 317 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ __Structural Patterns__:
| [3-tier](structural/3-tier.py) | data<->business logic<->presentation separation (strict relationships) |
| [adapter](structural/adapter.py) | adapt one interface to another using a white-list |
| [bridge](structural/bridge.py) | a client-provider middleman to soften interface changes |
| [composite](structural/composite.py) | encapsulate and provide access to a number of different objects |
| [composite](structural/composite.py) | lets clients treat individual objects and compositions uniformly |
| [decorator](structural/decorator.py) | wrap functionality with other functionality in order to affect outputs |
| [facade](structural/facade.py) | use one class as an API to a number of others |
| [flyweight](structural/flyweight.py) | transparently reuse existing instances of objects with similar/identical state |
Expand Down
Loading

0 comments on commit b1d7a44

Please sign in to comment.