Chapter 8: Thinking TowardDesign


Overview

Discovery involves applying object thinking to the problem of decomposition (finding the objects that reside in the domain) and the problem of requirements (the behaviors expected of individual objects and aggregations of objects as they interact in that domain). Tangible results of discovery probably include partially completed object cubes and a set of stories. These results take tangible form because they have value as a kind of external memory for the group of individuals involved in development.

The CRC card method of Beck and Cunningham moved directly from discovery into implementation. Once you had a set of cards and stories, you started to write code, doing some design-oriented thinking about the code as you went along. XP follows the CRC card method closely: pick up a prioritized story card, grab a partner, and start writing code. XP does require you to write code to be used in testing your work before actually writing the code to implement your objects and stories. Design, in XP, is not a separate process; it s infused in the process of writing tests and code. (Actually, discovery is infused in the same activity: you identify your objects as you begin thinking about implementation ”tests and code ”of your user story.)

Moving directly to the coding process may work for those whose brains are already saturated with object thinking, who have internalized the ideas and ideals to the point that object thinking is automatic and largely nonconscious. For those just learning object thinking (or XP), there is a potential pitfall: the metaphors and definitions that served you well in discovery cease to provide valuable guidance as you think about design and implementation. Even worse , the good metaphors are replaced with bad metaphors, metaphors reflective of computer thinking as discussed in Chapter 1, Object Thinking. One of the roles of an XP coach is to provide direction and help novice developers learn the skills of object and XP thinking.

Thinking toward design suggests the continual application of object ideas and metaphors as the developer s focus shifts from story to specific object, to specific method, to test, to code. Attention shifts from what to how , and how involves making decisions about design and implementation that are not required when the focus is on the domain and what is expected from objects participating in that domain.

Thinking toward design implies that it isn t necessary to actually construct formal, documented designs ”only that your actual activities should continue to be guided by object ideas and metaphors. Tangible documents and models suggested in the rest of this chapter are intended to illustrate object thinking about design and implementation and provide a convenient means of sharing ideas among a group of developers. As you internalize object thinking, the use of tangible documentation becomes less critical while remaining useful as a kind of  checklist you can use as a substitute for perfect memory (both individual and collective). An XP test is another form ”the preferred form, usually ”of external memory and the only form that s intended to persist past the point of its immediate creation and use. Tests remain even after the whiteboard full of  diagrams is wiped clear and the deck of story cards has found its way to the recycling bin.




Microsoft Object Thinking
Object Thinking (DV-Microsoft Professional)
ISBN: 0735619654
EAN: 2147483647
Year: 2004
Pages: 88
Authors: David West

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net