Friday 4 May 2007

BLOG 13 -Conclusion on PAFSD Module

BLOG 13

As the PAFSD module comes to an end as the semester ends, in a nutshell I can say I have learnt a lot and am thinking to apply patterns were applicable to my software engineering project.

In general I now understand what patterns are and are not. Also I now understand clearly how wrong implementation and use of catalogue patterns can lead to bad solutions hence, anti-patterns.

The introductory sections of the module dealt with Christopher Alexander’s ideas of patterns. The main focus of this module was on design patterns by Gang of Four (GoF), the elements of patterns and how to create and catalogue a new pattern using the elements of patterns by Alexander or GoF. In one of my earlier blog, I tried to explain what a design pattern is. The last sessions of this module-lecture covered Anti-patterns. (I also tried to explain Anti-patterns in one of my blogs).

GoF categorized there patterns in three groups:
Creational
Structural
Behavioral

Twenty three (23) patterns fall within these categories. They are summarized below;

Creational Patterns

Abstract Factory
This pattern is used when you want to create an instance of several families of classes.

Builder
This pattern is used when you want to separate object construction from its representation.

Factory Method
This pattern creates an instance of several derived classes.

Prototype
This pattern allows a fully initialized instance to be copied or cloned.

Singleton
This pattern can be applied to a class of which only a single instance can exist.

Structural Patterns

Adapter
This pattern is used when you want to match interfaces of different classes


Bridge
This pattern is used when you want to separates an object’s interface from its implementation

Composite
This pattern is used when you want a tree structure of simple and composite objects

Decorator
This pattern is used when you want to add responsibilities to objects dynamically

Facade
This pattern is used when you want a single class that represents an entire subsystem

Flyweight
This pattern is used when you want a fine-grained instance used for efficient sharing

Proxy
This pattern is used when you want to an object representing another object


Behavioral Patterns

Chain of Responsibility
This pattern is used when you want to find a way of passing a request between a chain of objects

Command
This pattern is used when you want to encapsulate a command request as an object

Interpreter
This pattern is used when you want a way to include language elements in a program

Iterator
This pattern is used when you want to sequentially access the elements of a collection

Mediator
This pattern is used when you want to define simplified communication between classes

Memento
This pattern is used when you want to capture and restore an object's internal state.

Observer
This pattern is used when you want a way of notifying change to a number of classes.

State
This pattern is used when you want to alter an object's behavior when its state changes

Strategy
This pattern is used when you want to encapsulates an algorithm inside a class

Template Method
This pattern is used when you want to defer the exact steps of an algorithm to a subclass

Visitor
This pattern is used when you want to define a new operation to a class without change

Cheers to you all that sent your comments. Thanks a lot and good luck

1 comment:

SAMUEL said...

Good piece of hard work here. I have been going through people blog and none talked about the 23 element of the gof patterns. i only thing that i feel is wrong with it is that you only defined what they are with explaining it in detail. Good work, keep it up.