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