1 / 33

Exploring design space with Interactive pattern stories James Siddle, Kevlin Henney

This workshop explores the concept of interactive pattern stories, which capture the sequence of patterns used in a design example. Participants will engage in interactive sessions to generate ideas for alternative story paths and other pattern-based interactive stories.

Download Presentation

Exploring design space with Interactive pattern stories James Siddle, Kevlin Henney

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exploring design space with Interactive pattern storiesJames Siddle, Kevlin Henney ACCU 2009

  2. Agenda • Workshop purpose • Concepts • Patterns, languages, sequences, stories • Introduction to interactive pattern stories • Interactive session • Introduction • Break out groups • Summary

  3. Workshop purpose • Input to book writing effort • Gather feedback • what was learned from interactive stories • format likes/dislikes • Generate ideas • alternative story paths • ideas for other pattern-based interactive stories

  4. Note on use of feedback • Please: • don’t divulge anything unless you’re happy for it to be used in the book • no confidential or sensitive information • Workshop attendees will be acknowledged • Will make specific acknowledgements if requested • Correction to printed materials • J. Siddle representing himself, not IBM

  5. Patterns, languages, sequences, storiesKevlin Henney ACCU 2009

  6. Patterns • Patterns capture recurring problem–solution pairs with respect to context • A pattern is named and contributes to design vocabulary • A problem is characterised in terms of forces and the solution offers an approach with consequences (both pros and cons) • A pattern represents a design decision, whether conscious or not, explicit or not

  7. Pattern Stories • A pattern story brings out the sequence of patterns used in a design example • They capture the conceptual narrative behind a given piece of design, whether from a system in production or an illustrative example • Forces and consequences are played out in order, each decision illustrated concretely

  8. JUnit Storyboard

  9. POSA4 Warehouse Story

  10. Pattern Sequences • A pattern sequence captures the underlying narrative behind a story • A sequence can be described and applied independent of a pattern story • Pattern sequences focus on incremental development • Pattern compounds are examples of named, short sequences • E.g., MVC, Interpreter, Pluggable Factory

  11. JUnit Storyboard Distilled • JUnit storyboard can be summarised as a pattern sequence • I.e., Command, Template Method, Collecting Parameter, Class Adapter, Pluggable Selector, Composite • A summary of the sequence does not show how roles interact • E.g., what classes play what roles in Composite

  12. Batch Iterator typedef sequence<any> many; interface SomeBatchIterator{booleannext_n(in unsigned long how_many, out many result); booleanskip_n(in unsigned long how_many);}; • A Batch Iterator is an Iterator that uses a Batch Method to express pull • Good for collection access in high-latency environments, e.g., distributed systems

  13. Pattern Languages • A pattern language connects many patterns together • It captures connections and possibilities between different patterns, including alternatives, options and necessary steps • There may be many possible and practical sequences through a language • In the limit, a lone pattern sequence can be considered a narrow pattern language

  14. STL Patterns Algorithm–Representation Separation Container Encapsulated Algorithm Stream Half-Open Iteration Range Counted Iteration Range Past-the-End Value Container-Encapsulated Algorithm Function Object Copied Value Iterator const Iterator Pointer Protocol Categorised Protocol Adaptor Smart Pointer Trait-LookupTemplate Tagged Category Deduction Helper Pluggable Type Nested Trait Pluggable Object Tagged Overload Traits Holder TraitsBase Class

  15. Context Encapsulation  ECO ECO, DCI ECO, DCI, RPC ECO, DCI, RPC, RSCO ECO, RPC, DCI ECO, RPC, DCI, RSCO ECO, RPC, RSCO ECO, RPC, RSCO, DCI Encapsulated Context Object Role-Partitioned Context Decoupled Context Interface Role-Specific Context Object

  16. Design As a noun, design is the named (although sometimes unnameable) structure or behavior of a system whose presence resolves or contributes to the resolution of a force or forces on that system. A design thus represents one point in a potential decision space. A design may be singular (representing a leaf decision) or it may be collective (representing a set of other decisions).... All architecture is design but not all design is architecture. Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change. Grady Booch

  17. Design Space • An individual design represents a point in a multidimensional design space • A pattern story represents a sequence of points, a path, in design space • A pattern represents a softly bounded region in design space • A pattern sequence represents a sequence of regions, a pattern language a branching set of regions

  18. Introduction to Interactive Pattern StoriesJames Siddle ACCU 2009

  19. Agenda • Introduction • Concepts • Interactive fiction attributes • Design choices • Example • Exploring design space • Interactive pattern story creation • What if…?

  20. Introduction • Why interactive pattern stories? • Pattern story is one design example • Interactivity extends concept • Exploration • Engagement • Focus on learning

  21. Concepts • Pattern concepts • Language, sequence, story • Interactive Fiction • Branching narrative • Second person (you) • Game • Examples – CYOA, Fighting Fantasy • Interactive pattern story • Combine interactive fiction • …with pattern story

  22. Interactive fiction attributes • Engaging format • Gameplay / fun • It’s about YOU • Illustrations showing consequences • Encourages self-motivated learning, exploration

  23. Design choices • Derive from connections in the pattern language • Alternative patterns • Optional patterns • Choices not limited to those in the pattern language • Less desirable alternatives • Speculative versus Known • Explore the multiverse

  24. Example 1 You are developing a request-handling framework, and are faced with the problem of how requests can be issued and handled so that the request handling framework can manipulate the requests explicitly, but in a uniform way. You decide to objectify requests as COMMAND objects, based on a common, abstract, execution interface…. … Go to 2

  25. Example 2 You need to ensure that compound requests are handled. Compound requests correspond to multiple requests performed in sequence and as one; they are similarly undone as one. The problem is, how can compound requests can be expressed without upsetting the simple and uniform treatment of COMMANDs within the framework? If you want to create a special kind of COMMAND to deal with all compound requests, go to 3. Otherwise, if you're happy for compound requests to be handled by the framework as it stands, go to 4.

  26. Example 3 You decide to create a COMPOSITE COMMAND object that aggregates other COMMAND objects. To initialise a COMPOSITE COMMAND correctly, you add other COMMANDs (both primitive or COMPOSITE) to it in sequence. This allows arbitrary compound requests to be composed, simplifying framework use, and reducing complexity and coupling. This enhances maintainability and evolvability of client code. But this does reduce understandability of the framework– COMPOSITE implementations can be complex and non-obvious. The End – you win!

  27. Example 4 You decide to support compound requests through concrete COMMAND objects which aggregate other COMMAND objects. The existing framework already supports this, but while this leaves your framework simpler, it means that clients of the framework will find it harder to use. Clients will need to represent each compound request via a unique concrete class, which will be difficult to maintain and harder to evolve. The End – you lose

  28. Exploring design space • Read one full story, making choices • Digest outcome • Go back to the start, repeat • Skim read highlighted sentences, phrases • Try different paths, with different outcomes • Reflect

  29. Interactive pattern story creation • Start with a linear story • Derive from a pattern language • Add a variation point • Guided by pattern text • Undesirable alternatives • Add more to create a tree • Branches may join • Provide just enough information

  30. What if…? • Reading doesn’t appeal? Branching narratives are not constrained to written format

  31. Thank you for Listening Questions?

  32. Interactive SessionJames Siddle, Kevlin Henney ACCU 2009

  33. Introduction • Breakout groups • Reading time – 10-15 mins • Discussion time – 20 mins • Capture output • Flipcharts • Key questions on handout form • Side 1-feedback, Side 2-ideas • Summary / Q&A

More Related