Skip to content

Commit

Permalink
New repository structure
Browse files Browse the repository at this point in the history
  • Loading branch information
duboviy committed Jan 2, 2017
1 parent 9d66696 commit 96c77ba
Show file tree
Hide file tree
Showing 57 changed files with 36 additions and 34 deletions.
68 changes: 35 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,54 @@ __Creational Patterns__:

| Pattern | Description |
|:-------:| ----------- |
| [abstract_factory](abstract_factory.py) | use a generic function with specific factories |
| [borg](borg.py) | a singleton with shared-state among instances |
| [builder](builder.py) | instead of using multiple constructors, builder object receives parameters and returns constructed objects |
| [factory_method](factory_method.py) | delegate a specialized function/method to create instances |
| [lazy_evaluation](lazy_evaluation.py) | lazily-evaluated property pattern in Python |
| [pool](pool.py) | preinstantiate and maintain a group of instances of the same type |
| [prototype](prototype.py) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |
| [abstract_factory](creational/abstract_factory.py) | use a generic function with specific factories |
| [borg](creational/borg.py) | a singleton with shared-state among instances |
| [builder](creational/builder.py) | instead of using multiple constructors, builder object receives parameters and returns constructed objects |
| [factory_method](creational/factory_method.py) | delegate a specialized function/method to create instances |
| [lazy_evaluation](creational/lazy_evaluation.py) | lazily-evaluated property pattern in Python |
| [pool](creational/pool.py) | preinstantiate and maintain a group of instances of the same type |
| [prototype](creational/prototype.py) | use a factory and clones of a prototype for new instances (if instantiation is expensive) |

__Structural Patterns__:

| Pattern | Description |
|:-------:| ----------- |
| [3-tier](3-tier.py) | data<->business logic<->presentation separation (strict relationships) |
| [adapter](adapter.py) | adapt one interface to another using a white-list |
| [bridge](bridge.py) | a client-provider middleman to soften interface changes |
| [composite](composite.py) | encapsulate and provide access to a number of different objects |
| [decorator](decorator.py) | wrap functionality with other functionality in order to affect outputs |
| [facade](facade.py) | use one class as an API to a number of others |
| [flyweight](flyweight.py) | transparently reuse existing instances of objects with similar/identical state |
| [front_controller](front_controller.py) | single handler requests coming to the application |
| [mvc](mvc.py) | model<->view<->controller (non-strict relationships) |
| [proxy](proxy.py) | an object funnels operations to something else |
| [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 |
| [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 |
| [front_controller](structural/front_controller.py) | single handler requests coming to the application |
| [mvc](structural/mvc.py) | model<->view<->controller (non-strict relationships) |
| [proxy](structural/proxy.py) | an object funnels operations to something else |

__Behavioral Patterns__:

| Pattern | Description |
|:-------:| ----------- |
| [chain](chain.py) | apply a chain of successive handlers to try and process the data |
| [catalog](catalog.py) | general methods will call different specialized methods based on construction parameter |
| [chaining_method](chaining_method.py) | continue callback next object method |
| [command](command.py) | bundle a command and arguments to call later |
| [mediator](mediator.py) | an object that knows how to connect other objects and act as a proxy |
| [memento](memento.py) | generate an opaque token that can be used to go back to a previous state |
| [observer](observer.py) | provide a callback for notification of events/changes to data |
| [publish_subscribe](publish_subscribe.py) | a source syndicates events/data to 0+ registered listeners |
| [registry](registry.py) | keep track of all subclasses of a given class |
| [specification](specification.py) | business rules can be recombined by chaining the business rules together using boolean logic |
| [state](state.py) | logic is organized into a discrete number of potential states and the next state that can be transitioned to |
| [strategy](strategy.py) | selectable operations over the same data |
| [template](template.py) | an object imposes a structure but takes pluggable components |
| [visitor](visitor.py) | invoke a callback for all items of a collection |
| [chain](behavioral/chain.py) | apply a chain of successive handlers to try and process the data |
| [catalog](behavioral/catalog.py) | general methods will call different specialized methods based on construction parameter |
| [chaining_method](behavioral/chaining_method.py) | continue callback next object method |
| [command](behavioral/command.py) | bundle a command and arguments to call later |
| [iterator](behavioral/iterator.py) | traverse a container and access the container's elements |
| [mediator](behavioral/mediator.py) | an object that knows how to connect other objects and act as a proxy |
| [memento](behavioral/memento.py) | generate an opaque token that can be used to go back to a previous state |
| [observer](behavioral/observer.py) | provide a callback for notification of events/changes to data |
| [publish_subscribe](behavioral/publish_subscribe.py) | a source syndicates events/data to 0+ registered listeners |
| [registry](behavioral/registry.py) | keep track of all subclasses of a given class |
| [specification](behavioral/specification.py) | business rules can be recombined by chaining the business rules together using boolean logic |
| [state](behavioral/state.py) | logic is organized into a discrete number of potential states and the next state that can be transitioned to |
| [strategy](behavioral/strategy.py) | selectable operations over the same data |
| [template](behavioral/template.py) | an object imposes a structure but takes pluggable components |
| [visitor](behavioral/visitor.py) | invoke a callback for all items of a collection |


__Others__:

| Pattern | Description |
|:-------:| ----------- |
| [blackboard](blackboard.py) | (architectural model, assemble different sub-system knowledge to build a solution, AI approach - non gang of four pattern) |
| [graph_search](graph_search.py) | (graphing algorithms, not design patterns) |
| [blackboard](other/blackboard.py) | architectural model, assemble different sub-system knowledge to build a solution, AI approach - non gang of four pattern |
| [graph_search](other/graph_search.py) | graphing algorithms - non gang of four pattern |
| [hsm](other/hsm/hsm.py) | hierarchical state machine - non gang of four pattern |
Empty file added behavioral/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added creational/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file added fundamental/__init__.py
Empty file.
File renamed without changes.
Empty file added other/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
Empty file added other/hsm/__init__.py
Empty file.
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion hsm.py → other/hsm/hsm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Implementation of the HSM (hierachrical state machine) or
Implementation of the HSM (hierarchical state machine) or
NFSM (nested finite state machine) C++ example from
http://www.eventhelix.com/RealtimeMantra/HierarchicalStateMachine.htm#.VwqLVEL950w
in Python
Expand Down
File renamed without changes.
File renamed without changes.
Empty file added structural/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 96c77ba

Please sign in to comment.