Friday, November 20, 2009

Label Design Pattern

Intent
Provide a system where entities can be assigned labels.

Motivation
Label is a keyword or a reminder that designates the category of an entity. For example the label 'banking' can be used to store entities related to banking, such as account numbers, ATM passwords etc. An entity may have no label or one or multiple labels attached to it. In this system labels can be accessed from entities and entities can be accessed from labels.

Label pattern is a simple user-configured filtering system to allow quick access to a long and tedious entity list. Google applications such as Gmail use Label pattern.

Applicability
Use Label pattern when
  • You have long list of entities that can be categorised in different ways.
  • Entity names are tedious and hard to match exactly therefore an associated label can be used to filter related entities.
  • The user wants to see related entities together for easier management. Example 'ebank' label can be assigned to electronic banking related user names and passwords.


Structure

Participants
  • System
Maintains a list of labels and entities. The System is responsible for the integrity of both lists. Entities can be added, removed, attached or detached labels. When a label has no entity attached it will be removed from the system.
  • Entity
An Entity object represents a unit of data that the user wants to quickly locate and access its contents.
  • Label
A Label is a data structure that holds a label (a keyword). A label is a single case insensitive word.

Acknowledgements
The UML diagram was generated with ArgoUML, a free cross-platform UML generation tool.
ArgoUML Web site: http://argouml.tigris.org/

No comments:

Post a Comment