Design Patterns Tutorial
A tutorial on GOF design patterns. This tutorial is for beginners who are going to learn design patterns for the first time. Each pattern is expalined with suitable examples.

Builder Pattern

24/11/2013 Categories: Creational Patterns. No Comments on Builder Pattern

Intent: Separate the construction of a complex object from its representation so that the same construction process can create different representations.   Motivation: A RTF (Rich Text Format) reader application should be able to convert a RTF document to several formats like: plain text or TeX representation or into a text widget which allows users […]

Read the rest of this entry »

Factory Method Pattern

24/11/2013 Categories: Creational Patterns. No Comments on Factory Method Pattern

Intent: Defines an interface for creating an object, but lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.   Also Known As: Virtual Constructor   Motivation: Take into consideration a framework for desktop applications. Such applications are meant to work with documents. A framework for desktop applications contains […]

Read the rest of this entry »

Abstract Factory Pattern

24/11/2013 Categories: Creational Patterns. No Comments on Abstract Factory Pattern

Intent: Abstract factory provides an interface to create a family of related objects, without explicitly specifying their concrete classes.   Also Known As: Kit.   Motivation: Modularization is a big issue in today’s programming. Programmers are trying to avoid the idea of adding more code to the existing classes to encapsulate more general information. Let’s […]

Read the rest of this entry »
Scroll Up