First page Back Continue Last page Overview Graphics

Analogy Patterns in Software


Notes:

The SaleItem class structure here is a simple example of a vanilla analogy (the Na, Aa, Nv, Av annotations have been added from the analogy template). Although as mentioned before the analogy template borrows heavily from the class structure so it's no surprise that they are practically identical.

Of special note is that the category attribute is an analogy itself with varieties “Electricals”, “Furnishings” etc. Attributes in the analogy description (A subscript a) reference another analogy by either the type or the name chosen to represent the attribute (in this case the name “category” is the name of the analogy). The Attribute Value in the variety (Av) will reference a variety of that analogy. Here category is the sub-analogy with “Electricals” & “Furnishings” as it's varieties, For our purpose, we view the category analogy as having no attributes or operations and so it is sufficient to reference the names only . Should this change we would reference the appropriate analogy structure for category.

This explains the dotted lines in the analogy template that look a little like Mickey Mouse ears here.

By the way there will be a better Disney reference toward the end of this presentation.

Due to time considerstions I will need to go quickly through the next few slides. The full presentation is on the web and I've included the code examples on the back of the handout..