Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Design Patterns with Ruby, Rails, and @igbanam

Igbanam
August 12, 2017

Design Patterns with Ruby, Rails, and @igbanam

An exposé on Design Patterns and how they are used in Ruby and Rails.

Igbanam

August 12, 2017
Tweet

More Decks by Igbanam

Other Decks in Programming

Transcript

  1. What are Design Patterns Design patterns are repeatable solutions to

    problems which occur frequently in the industry. In software alone, these are bugs, flaws, and so on. Design Patterns are not exclusive to software. They exist in every industry. But for the purposes of this talk, we will be focusing on software design patterns as seen in Ruby and Rails.
  2. What are Design Patterns According to the Gang of Four,

    they are split into three. Creational — How objects are created Structural — How objects are organized Behavioural — How objects behave at runtime
  3. Design Patterns in Rails Creational Abstract Factory Builder Factory Singleton

    The Rails-ional FactoryGirl Associations .build FactoryGirl, Rspec::Stub Rails::Logger
  4. Design Patterns in Rails Structural Adapter Composite Decorator Railstructural ¯\_(ツ)_/¯

    Adapter, Serializer, AR DBMS ActiveRecord’s :has_many Draper, View Helpers