Posts Tagged ‘design patterns’

6

COMMENTS

Design Patterns in Ruby: Chain of Responsibility

Today’s post discusses the first of the behavioral pattern shown by the GoF, the chain of responsibility.

This pattern expects a series of commands to be executed and a set of objects capable to handle them.
Each of these “handler” objects can send the command to the next handler in the chain if it is not able [...]


GO
5

COMMENTS

Design Patterns in Ruby: Adapter

This second post of the series leaves for a moment the creational patterns and speaks about one of the most important structural pattern: the Adapter.

The purpose of an adapter is “to convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.”

Suppose therefore [...]


GO
16

COMMENTS

Design Patterns in Ruby: Abstract Factory

An abstract Factory provides a common interface for creating families of related objects together.
The client object does not bother to build objects directly, but it calls the methods provided by this common interface.

Below is showed one possible implementation of an abstract Factory and its concrete Factories that implement it.

Suppose we have two categories of games [...]


GO
7

COMMENTS

Design Patterns in Ruby: Introduction

Hello everyone.

With this post I would like to start a serie of articles concerning the description of the most common design patterns and how these can be applied with the Ruby language.

In the world of software engineering you don’t need to reinvent the wheel to face daily problems: these problems are often very common and [...]


GO

Copyright 2012 DevInterface s.n.c.

DevInterface Blog is proudly powered by WordPress