Tuesday 13 February 2007

Lecture 1 - Introduction to Pattern


This lecture was an Introduction to Patterns

How I have understood Patterns

Patterns can be seen as a templates that can be used to solve a specific problem that occurs over and over again in a given context or set of circumstances.

The use of patterns offers tested and proven development paradigms good quality results. In other words and a tested and proven solution to that problem is applied, the resulting solution of good quality since the solution has successfully been used over and over again to solve a specific problem.

Below are the components that make up a pattern.
  • Problem
  • Context
  • Motivation (force)
  • Solution
  • Examples
  • Related patterns
  • Known uses
  • Pattern name

Benefit of using Patterns

The use of pattern speeds up the development process by providing tested and proven development paradigms. Developer therefore spend less time on developing test cases as they are sure that the product will work as expected, since it has been built following a well tested and proved method. However, this is no justification of not developing thorough a test case.

Patterns also reduce the need to redesign a solution to a specific problem. Whenever a problem arises, the already tested and proven solution (pattern) can a apply to it without wasting much time rethinking of a solution

Since patterns provide reusable solutions, they help to reduce costs involved in developing a product or getting solutions to a problem. Few consultants on a project for example may be reduced as provide expertise in solving a specific problem.

Where patterns are well documented/ catalogued, they are useful in passing knowledge from experts to novice.



I have discovered my own pattern!!!!

After the lesson I was able to develop my own pattern to solve. I am currently doing a project in Flash lite 2.0; for the time I have working with Flash Lite 2.0 I have discovered the pattern below.


Pattern name: Flash lite 2.0 tween pattern

Problems:

How do I develop movie player (with play, stop, forward and backward functions) in Flash lite 2.0 without having to study Actionscript 2.0?

Context:

Am developing a movie player in Flash lite 2.0, Among other modules in the application, the User interface module has the following functionalities: Play functions, Stop, Forward, and Backward. ActionScription 2.0 is used to develop these functionalities. I am not a good Actionscript 2.0 programmer and have limited time to ActionScript 2.0.

Solution:

Place each function (play, stop, forward and backward) in a separate frame on stage and tween all the frame.


References:

http://members.cox.net/risingl1/articles/expertise.htm
Linda Rising
Patterns: A way to reuse expertise
Accessed: 6th February 2007

http://www.tech.port.ac.uk/staffweb/chandlej/patterns/patterns.htm#Using%20a%20Design
Jane Chandler and Steve Hand (20th March 1998)
Introduction to Patterns
Accessed: 6 February 2007


Design Patterns
http://www.dofactory.com/Patterns/Patterns.aspx
Accessed: 6th February 2007

Design Pattern (Computer Science)
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)#Uses
Accessed:6th February 2007