Patterns For Software Design

This blog will focus on reflecting on how l have understood my patterns lectures and any other reading material

Saturday, May 13, 2006

Individual View On Patterns

I found my Patterns lectures very challenging at the beginning of the course not that I find them manageable but am still on am on going processes of learning each individual; pattern and trying to map it to a real world situation for easy understanding. The subject was a very new concept considering l had come from a professional background of IMIS.
Professionals would be expected to know but this applies to those in the filed already.

In the early lectures it was difficult to understand terms such as objects classes and instance as it seemed to me like they were used interchangeably .In trying to learn and understand patterns I found the Head First book interesting and very detailed , the Gang of four book was too broad to follow and brief in explaining the essentials.
AntiPatterns

AntiPatterns

Definition: These are design patterns that have been implemented as solutions to particular problems but have been proven to be ineffective design solutions .Antipatterns have been documented into a catalogue as good design patterns for reference.

Antipatterns are represented by a template as good design patterns the template has the following features

Name: The name should be able to immediately highlight the user of what the antipattern is about.

Problem: It describes the inefficiencies which are being experienced by the bad design patterns solution.

Symptoms: How can you identify the problems (characteristics of identifying the problems)?

Consequences: These are the results produced after implementing these patterns.

Root Cause: This is analysis of where the pattern has been applied incorrectly and resulted in a failed solution.

Suggested Solution: Redesigned or improved design pattern that will result in an effective design problem solution.

Why are AntiPatterns important

AntiPatterns when identified and documented enable developers to produce high quality software as a result of avoiding them in developing .Developers are also able to analyse the occurrence of these inefficient design patterns in particular problems and alter the pattern to produce effective problem solving solutions .[1]

AntiPatterns are tools that prevent problems from occurring by helping identify a problem before it occurs [1]

AntiPatterns enable developers to recover from the use of problems by referencing its documented material.

Structure of Anti Patterns

Anti Patterns
Context and Cause
AniPatterns Solution

Symptoms and Consequences

Refractored Solution

Benefits AntiPatterns Solution
Related Solution

Ref: AntiPatterns: Refactoring Software Architectures, and Projects in Crisis by Brown et al [2]

To view the Diagram illustrated above click below
1. http://www-128.ibm.com/developerworks/library/ws-antipatterns/
2. AntiPatterns: Refactoring Software Architectures, and Projects in Crisis by Brown et al

Object Oriented Concepts

Classes and Objects

I thought of writing these descriptions for colleagues who still get these terms mixed up like I sometimes do.

Objects

Objects represent particular instances of a specific class. It’s an entity which has attributes and behaviour, the attributes and defined by the class definition [1].The object uses the defined structure used by the class to create or ad new objects.

The attributes that exist in an object can change when messages are passed to perform a task.

Object Oriented Design

Easy maintenance of programs due to reduced ripple effects and high modularity
Objects are reusable
Illustrate mappings from the real world to systems [2].

Classes

A class is a set of objects which have similar or common characteristics and behaviour .They describe the attributes and methods that implement the behaviour.
A class can also be referred to as a template thus a guide or outline of performing tasks.

Classes allow reusability by novice programmers of classes that already exist.
In overall objects and classes represent abstractions in a more easy, direct and explicit manner. [1]

1. Lecture Notes on Object Oriented Concepts by John Gachoka
2. http://peoples.cs.vt.edu/~kafura/cs2704/mapping.html