Sunday, 13 May 2007

THE STRATEGY PATTERN

The Strategy Design Pattern

The Strategy Design Pattern fundamentally consists of a way to separate an algorithm from their host, and enclosing algorithm into a different separate class. startegy patten does allow you to switch the algorithm that you where using at any time of your design.
Some of the avantages that strategy pattern allow you to do is to keep track of the behaviours that you want your object to perform.



Saturday, 12 May 2007

DECORATOR PATTERN

DECORATOR PATTERN

After the class, i did some research on the decorator pattern and ii find out that its one of the most important of the 23 pattern types. Some of the reason why i said its important is that is flexible and you can do what ever you want to do with it. that is why i come up with this defination of decorator pattern.
Decorator pattern is the design pattern that allow additional or new behavious to be added to an existing design dynamically.
The example i can give for easy understanding of a decorator is, when you go to a chinese restarant to buy food, you can buy your rice and as them to add some aditive food to it, like chicken wing, ribs, soup and so on. So all the ribs, chicken wing and soup are all decorator.



REFERENCES

http://www.exciton.cs.rice.edu/JavaResources/DesignPatterns/DecoratorPattern.htm

Thursday, 19 April 2007

ANTI-PATTERN

ANTI-PATTERN

Anti-pattern are important tools to avoid problems from happening, by identifying the problem before it become a problem, and also trying to provide awareness on how its can be prevented from happening.

PATTERNS VS ANTI-PATTERNS

This critics we be done using the format by which pattern and anti pattern are designed.
PATTERNS ANTI-PATTERNS
PATTERNS Name: A name, this is used for the purpose of identification of the pattern that is being solved.
ANTI-PATTERNS Name: A name this anti-pattern means a way prove the use of the anti-patterns in the design.
PATTERNS Problem: this is a reoccurring problem that is faced by an individual or an organisation.
ANTI-PATTERNS Problem/bad solution: In this case problem is the common reoccurring mistake or bad solutions that are made doing pattern and are related to anti-patterns.
PATTERNS Solution: This is the best solution recommended by an individual or an organisation after several encounter with a particular problem.
ANTI-PATTERNS Symptoms: this show point to the direction where the problem is located in the design.
PATTERNS Consequences: This explains the merit and demerit of the recommended solution to the context.
ANTI-PATTERNS Consequences: this brings out the result, which is why anti-pattern, can be use to solve the problem.
PATTERNS Examples: this is where you be given past examples of where the solution have been applied to solve a particular problem.
ANTI-PATTERNS Root cause: this is the most important place because this is where the context for the anti-pattern is provided, because this is where is going to show where the pattern was applied incorrectly and why it results in a problem.

ANTI-PATTERNS Suggested solution: this is where the anti-pattern is going to give out a refined solution to the problem and attached more benefit of why the solution is best.

Thursday, 12 April 2007

ADAPTER PATTERN

ADAPTER PATTERN

According to my understanding and research done on the adapter pattern, adapter pattern alway come in two forms and that is object adapter and class adapter. To make it more simpler for me to understand and explain, i will explain each one, one by one.




An adapter pattern allows classes from different part of the design to get together because of incompatibility. The job of adapter is to bring then together anbd make them work regardless of the different code or design. e.g if you write a code in JAVA and in are using SQL server, both of them might not be compatible must with the use of adapter, this is very possible.

OBJECT ADAPTER PATTERN

firstly, object adapter pattern, Object adapters use a constitution method to get one interface to another. The adapter trys to get the interface that the client we like to see in the ddesign of the system, while the instance of the adaptee is hold.



CLASS ADAPTER PATTERN
Class adapters use alot of inheeitance from differnet part to achieve their goals, the class apater does not use the interface of the clients but its inherit the interface of the customer and also inherit the interface of the adaptee.



REFERENCE

http://exciton.cs.rice.edu/JavaResources/DesignPatterns/adapter.htm

Thursday, 5 April 2007

ABSTRACT FACTORY (GOF)

In my own word and understanding, abstract factory is a method of enclosing a group of single factories that are related to each other. One of the things I noticed in abstract factory is that, an individual that is not good in programming or UML diagram will always find it difficult to use abstract factory because is based on programming and UML diagram. In abstract factory, we should always have this in mind that there will always be a participant and a class diagram. A participant, which is the actor in the object that is use to for the purpose of understanding and illustration in the class diagram. A UML diagram, this is a diagram representation to show the actor, use case and their interrelationship. e.g.

(1)Fig 1
BENEFITS
consistency
changes can be done easily

Thursday, 29 March 2007

SOFTWARE PATTERNS.

Software pattern: according to my understanding, software patterns is the same as patterns. Pattern as a general repetation solution to occuring problem.The only different there is just the software that is added to the pattern, so because of that i will define software pattern as overall solution to occuring problem in the software industry.
The introduction of software pattern is good in the industry because it bring about the introduction of alot of thing that are missing in the industry. some of the things that software pattern bring to the industries
1. avoid repeatation
2. no time wastage
3. comparism
4. pattern allows you to edit

with all of this, software pattern as make alot of thing that are impossible-possible.

Thursday, 8 March 2007

COURSE WORK CRITICISM.

Overall, i think the course work is good and challenging. when i first got the course work, the first thing that come to my mind after going throught what we are suppose to do is programming and UML diagram which am not good in.
To start with question 1 UML diagram, its alrite to have it in the course work but when you dont know what to do them its becomes a problem. i have been trying o do alot of reading regarding the class diagram and other related UML diagram that i need to know o get the work done.
Question 2 code (programming), i have never been a good fan of programming since i started mt IT career and one thing i noticed is that you can do without it. i have stated learning some of the code i will nedd for the course work.
Question 3 Abstract factory, i think i should be alrite with abstarct factory because i have done a lot of research on that i have i done alot of work on it as well, so am okay with the question 3.
Question 4 Anti patterns, i love this part of the question because i like going against thing and bring out the mistake made my people. the only thing that make that question difficult is the quote in the sentence, i dont understand it.
Question 5 BLOG, blog is good and easy, that is if you get them posted on time.
overall nice course and challenged.