XPlorations
What's the Metaphor?"The system metaphor is a story that everyone - customers, programmers, and managers -We seek a system metaphor for several reasons:
What if the metaphor is "wrong"? You obviously don't want this problem, but all you can do is your best. If you later realize there's a better metaphor, evolve your system in that direction. This can be a very good thing - it means you've made a breakthrough learning in understanding your problem. What if you can't thinking up any good metaphors? There's always the "naive metaphor" - let objects be themselves. For example, a bank model might have Customer and Account objects. This may not give you any extra insights (since it's based on what you already know), but at least it lets you get started. What are some system metaphors that have been used?
Example: Customer ServiceSuppose we need to develop an application to support customer service representatives. For example: a customer calls in to complain that long distance doesn't work on their phone. The rep takes some information from them, and ensures that a technician works on the problem.We'll explore several metaphors that a team might work through, and see the tradeoffs we might make in letting each of these guide the system's development. The naive metaphor. Customer Service Reps create Problem Reports on behalf of Customers, and assign them to Technicians. Assembly line. Think of problem reports and solutions as the Assembly, and the technicians as Workers at Stations. This metaphor suggests the possibility that it might take a number of steps or people to solve a problem. In the naive metaphor, we have to carefully think through the implications of the metaphor. In the assembly line metaphor, the metaphor helps carry our understanding. For example, we might wonder how many items per hour come off the end of the line. This helps us think about the "capacity" of our operation. We might wonder what happens to an item once it hits the end of the line. Perhaps we'll want a policy of notifying each customer of the problem's resolution. We might wonder what happens when a station gets backed up. This might help us identify bottlenecks, and might lead us to think of workers as multiply skilled people who can pitch in where they're most needed. Some aspects of the assembly line metaphor don't work so well. An assembly line tends to have a relatively fixed structure, while we might want something more flexible. The steps from place to place are typically pre-defined; we might want something that decides routing based on the situation. Questions like these don't necessarily invalidate the metaphor, but rather help us to explore and understand its limits. Problem-solving chalkboard. An Expert puts a Problem on the Board. There are a number of Experts sitting around: when anyone sees a problem they can solve (or know how to break into easier sub-problems), they do so. There's a protocol that defines, "Who gets the chalk next?" and "When are we done?" This metaphor suggests a few potential problems: experts have different skills, and they may not necessarily agree on how to solve a particular problem. The chalkboard may become a scarce resource. The most knowledgeable person may find they're doing all the work. We may have "experts" who aren't as good as they think they are. Subcontractors. The rep is the General Contractor, with control over the whole Job. They can let work out to Subcontractors (who can delegate to others). This model treats the rep as a critical part of the process: the customer's advocate. Commitments and sub-commitments are tracked. Time bounds (service level agreements) can be built into the contracts. It leaves someone responsible overall, ensuring that problems don't fall through the cracks. Workflow. Workflow is a generalization of the assembly line, to support an arbitrary graph of possible transfers, along with the idea of dynamically determining what step is next. It is in effect a semi-standardized version of the naive model. The concept of workflow may not be a part of some peoples' mental framework. Even if it seems like a perfect fit based on the problem, it may not be the best choice if it won't give people any intuition about the system. (I find it a little abstract for a metaphor, but it might be just right given the right group of people.) Conclusion. We've discussed several potential metaphors: naive, assembly line, chalkboard, subcontracting, and workflow. Each of these brings a different perspective on the interplay of people and problems. The team needs to consider the strengths and weaknesses of each possible model, and select the best fit they can. Example: EditorsEditors have used a number of metaphors and models over the years.Card. An early editor style was to imitate punched cards: some number of lines, with 80 characters each. This was easy to implement, with a simple array of characters. Users had to confront the question, "What happens when your text is longer than a line?" Array of Lines. Another model was used by other editors: make each line stand on its own, with any length it needs. Again, implementation was simple: an array of pointers to variable-length lines. String. Initially used by TECO, and inherited by EMACS: the text is a giant string (with some character as a line separator). Lines could easily be of different lengths. This metaphor easily supports many operations (such as multi-line searches) that could be tricky in the preceding models.
Sequence of Runs. The previous models are adequate for simple text, but
something more complicated is needed to support styles. One solution is to
regard the text as a sequence of strings, each with the same style. So,
Tree. Another editor style is more tree-based, for hierarchical data. This was common in some Lisp editors (years ago), and also used in "structure-aware" or "syntax-directed" editors. It shows up as an outline view in some editors. Today, it's a common model for editing HTML and XML: since they require properly nested tags, the nodes form a hierarchy. Tree editors have powerful operators for locating and re-arranging hierarchies. Combination. Editors often combine these modes: a tree view may be built out of a string view, and vice versa. A purely tree-based editor may have simple text editing inside, and so on. A combination metaphor may be best, but make sure the combined power is worth the possible confusion it may cause. Conclusion. Each of these models has been used in real editors. The right metaphor provides the explanatory power you need, in a model that all parties understand. Limits of MetaphorsIt can be hard to find the right metaphor. There are several potential problems:
SummaryWe've briefly explored the meaning and usage of the system metaphor in XP.The metaphor provides a common vision and a shared vocabulary. It helps generate new understanding of the problem and the system, and it helps direct the system's architecture. We demonstrated how a couple different systems might explore a variety of metaphors, by brainstorming a few and comparing their world-views. Finally, we discussed some limitations of metaphors. Resources
[April 15, 2000] |
|
Copyright 1994-2006, William C. Wake - William.Wake@acm.org |