Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/crystal-community/crystal-patterns

:book: Examples of GOF patterns written in Crystal
https://github.com/crystal-community/crystal-patterns

crystal crystal-patterns gof-patterns oop

Last synced: 28 days ago
JSON representation

:book: Examples of GOF patterns written in Crystal

Awesome Lists containing this project

README

        

# Crystal Patterns
[![Build Status](https://travis-ci.org/crystal-community/crystal-patterns.svg?branch=master)](https://travis-ci.org/crystal-community/crystal-patterns)

Design patterns implemented in Crystal language (with [MK](http://mortalkombat.wikia.com) in mind).

The goal is to have a set of [GOF patterns](http://www.blackwasp.co.uk/gofpatterns.aspx) for Crystal users.

## Available implementations

- Behavioral
- [Command](behavioral/command.cr)
- [Iterator](behavioral/iterator.cr)
- [Memento](behavioral/memento.cr)
- [Observer](behavioral/observer.cr)
- [State](behavioral/state.cr)
- [Strategy](behavioral/strategy.cr)
- [Template](behavioral/template.cr)
- [Visitor](behavioral/visitor.cr)
- [Mediator](behavioral/mediator.cr)
- [Chain of Responsibility](behavioral/chain_of_responsibility.cr)
- [Interpreter](behavioral/interpreter.cr)
- Creational
- [Abstract Factory](creational/abstract_factory.cr)
- [Builder](creational/builder.cr)
- [Factory Method](creational/factory_method.cr)
- [Prototype](creational/prototype.cr)
- [Singleton](creational/singleton.cr)
- Structural
- [Adapter](structural/adapter.cr)
- [Bridge](structural/bridge.cr)
- [Composite](structural/composite.cr)
- [Decorator](structural/decorator.cr)
- [Facade](structural/facade.cr)
- [Flyweight](structural/flyweight.cr)
- [Proxy](structural/proxy.cr)

If you found any inconsistency or a place for improvement, pull requests are welcomed.

## Want more?

* [Crystal Design Patterns](https://github.com/bthachdev/crystal-design-patterns)
* [Design Patterns in Ruby](https://github.com/nslocum/design-patterns-in-ruby)

## Contributors

* [veelenga](https://github.com/veelenga) V. Elenhaupt - creator, maintainer
* [silverweed](https://github.com/silverweed) Silverweed - contributor
* [anicholson](https://github.com/anicholson) Andy Nicholson - contributor