Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.44 KB

README.md

File metadata and controls

46 lines (30 loc) · 1.44 KB

Design Patterns - Implimented in Ruby

This is code for a talk I gave for Springs.rb.

Heavily influenced by:

Design Patterns Elements of Reusabled Object-Oriented Software By: Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides

Amazon

What is a Design Pattern?

Design patterns are used as solutions to common problems within OO programming. They have four parts:

  1. Pattern name
  2. Problem
  3. Solution
  4. Consequences

Categorizations

There are fundamentally three groupings of patterns:

  1. Creational Patterns - deal with object creation
  2. Structural Patterns - composition of classes or objects
  3. Behavioral Patterns - how classes or objects interact and distribute responsibilities

What is this project?

I wanted to give code examples for each. But truthfully, code is the least important part of a DP. Understanding what it is and why you are using it is more important. So while I'll try to cover some of that in the readme, the book is much better at it than I am.

I'm going to cover 4 of the 23 + 2 more:

  • Builder
  • Singleton
  • Decorator
  • Observer
  • Delegation
  • Concerns

Other Reading