Sunday 4 March 2007

Critiquing the GOF cataloquing technique for Abstract Factory design pattern

This lecture’s tasks were:

Task1:

Selecting any one to the GOF Design patterns; and criticizing its cataloguing technique.

Below I criticise the GOF cataloguing technique of the Abstract Factory design pattern.


The Abstract Factory has been catalogued consisting of the following elements; Name, Intent, Also Known As, Motivation, Applicability, Structure, Participants, Collaborations, Consequences, Implementation, Sample Code, Knows Use, and Related Patterns.

This cataloguing technique gives a birds view of what the pattern is about, what it does and results of using the pattern. Such detailed information gives confidence to the user as all the information they need about the pattern is available.

Further it save the designer time as they would know how and where to apply the pattern rather than finding out such information from scratch.

By giving the applicability of the pattern further reassures the pattern user that the pattern under consideration will produce the results it claims to yield, and that the pattern has be used and proven to work.

The Consequence element in cataloguing the pattern is quite useful, since it adequately addresses the trade offs or benefits of using the pattern before it is used. Therefore the user is given a chance to carefully weigh the usage of the pattern.

While as the cataloguing technique has the above advantages, it does not come without flaws. Below are some of the disadvantages of the cataloguing technique of Abstract Factory.

The GOF have argued that the name of a pattern should be unique. That is a pattern is solely known by one name only. However, including the Also Known As element in the cataloguing technique compromises the uniqueness of a pattern name.

By explicitly showing where the pattern is used can reduce the designer innovativeness as they may not take time to think of new and better situations in which to apply the pattern. Designer may restrict themselves to applying the pattern to only known uses.

Since the Structure of the pattern is given; especially in form of a UML diagram, there seemed to be no need to further give a sample code for the pattern. This code may be left out as it can be worked out from supplied UML diagram. Users are given a choice to implement/ code the pattern in any language of their choice - of course an Object Oriented language. This removes the fuss of having the code the same pattern in say Java, Smalltalk, C++ and others.

The inclusion of Motivation and Applicability in the cataloguing technique is irrelevant. The Applicability section includes situation in which the pattern is usable and also represents the context part of the pattern. The Motivation section on the other hand provides a scenario which consists of a problem and a context in which the pattern can be used. This two elements can therefore be shown as one, that is either as Applicability or Motivation.


Task 2:

This task requires finding out one other Design Pattern apart from those supplied by the GOF



Typed Links Design Pattern

This is one of the MobileUI Design Patterns developed by Patterns in Interaction Design, www.welie.com. The Patterns in Interaction Design catalogue their patterns as: Problem, Context. Solution; Rationale; Example; and Known Uses.

The Typed Links Design Pattern with its elements.

Problem:
Users need to know what they are selecting

Context:

Since WML only has links there is no way to tell whether the link is used to go down a hierarchy or a link to a real service or a link that leads out of the portal.

Solution:
Use special prefixes to distinguish several types of links.
Use a prefixed link to indicate the type of the link. A "+" can be used to indicate a category, a ">" to indicate that it is an outgoing link. Other types may include payments or help.

Rationale:
The prefix shows meta information about the link destination. The meta information, even unconsciously, helps users to understand what they are doing.

Example:
To show a category a "+" is used and to show an outgoing link a ">" is used.

Knows uses: wap.tutch.nl

www.welie.com.