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

Embed Size (px)

Text of Exploring design space with Interactive pattern stories James Siddle, Kevlin Henney ACCU 2009

  • Exploring design space with Interactive pattern storiesJames Siddle, Kevlin HenneyACCU 2009

  • AgendaWorkshop purposeConceptsPatterns, languages, sequences, storiesIntroduction to interactive pattern storiesInteractive sessionIntroductionBreak out groupsSummary

  • Workshop purposeInput to book writing effortGather feedbackwhat was learned from interactive stories format likes/dislikesGenerate ideasalternative story pathsideas for other pattern-based interactive stories

  • Note on use of feedbackPlease:dont divulge anything unless youre happy for it to be used in the bookno confidential or sensitive informationWorkshop attendees will be acknowledgedWill make specific acknowledgements if requestedCorrection to printed materialsJ. Siddle representing himself, not IBM

  • Patterns, languages, sequences, storiesKevlin HenneyACCU 2009

  • PatternsPatterns capture recurring problemsolution pairs with respect to contextA pattern is named and contributes to design vocabularyA 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

  • Pattern StoriesA pattern story brings out the sequence of patterns used in a design exampleThey capture the conceptual narrative behind a given piece of design, whether from a system in production or an illustrative exampleForces and consequences are played out in order, each decision illustrated concretely

  • JUnit Storyboard

  • POSA4 Warehouse Story

  • Pattern SequencesA pattern sequence captures the underlying narrative behind a storyA sequence can be described and applied independent of a pattern storyPattern sequences focus on incremental developmentPattern compounds are examples of named, short sequencesE.g., MVC, Interpreter, Pluggable Factory

  • JUnit Storyboard DistilledJUnit storyboard can be summarised as a pattern sequenceI.e., Command, Template Method, Collecting Parameter, Class Adapter, Pluggable Selector, CompositeA summary of the sequence does not show how roles interactE.g., what classes play what roles in Composite

  • Batch IteratorA Batch Iterator is an Iterator that uses a Batch Method to express pullGood for collection access in high-latency environments, e.g., distributed systemstypedef sequence many;interface SomeBatchIterator { boolean next_n(in unsigned long how_many, out many result); boolean skip_n(in unsigned long how_many); };

  • Pattern LanguagesA pattern language connects many patterns togetherIt captures connections and possibilities between different patterns, including alternatives, options and necessary stepsThere may be many possible and practical sequences through a languageIn the limit, a lone pattern sequence can be considered a narrow pattern language

  • STL PatternsAlgorithmRepresentation SeparationContainerStreamIteratorHalf-Open Iteration RangeCounted Iteration RangePast-the-End ValuePointer ProtocolSmart PointerCategorised ProtocolPluggable TypePluggable ObjectEncapsulated AlgorithmContainer-Encapsulated AlgorithmCopied Valueconst IteratorAdaptorDeduction HelperTagged CategoryTagged OverloadNested TraitTraits HolderTraits Base ClassTrait-Lookup TemplateFunction Object

  • Context EncapsulationDecoupled Context InterfaceRole-Specific Context ObjectEncapsulated Context ObjectRole-Partitioned ContextECOECO, DCIECO, DCI, RPCECO, DCI, RPC, RSCOECO, RPC, DCIECO, RPC, DCI, RSCOECO, RPC, RSCOECO, RPC, RSCO, DCI

  • DesignAs 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

  • Design SpaceAn individual design represents a point in a multidimensional design spaceA pattern story represents a sequence of points, a path, in design spaceA pattern represents a softly bounded region in design spaceA pattern sequence represents a sequence of regions, a pattern language a branching set of regions

  • Introduction to Interactive Pattern StoriesJames SiddleACCU 2009

  • AgendaIntroductionConceptsInteractive fiction attributesDesign choicesExampleExploring design spaceInteractive pattern story creationWhat if?

  • IntroductionWhy interactive pattern stories?Pattern story is one design exampleInteractivity extends conceptExplorationEngagementFocus on learning

  • ConceptsPattern conceptsLanguage, sequence, storyInteractive FictionBranching narrativeSecond person (you)GameExamples CYOA, Fighting FantasyInteractive pattern storyCombine interactive fictionwith pattern story

  • Interactive fiction attributesEngaging formatGameplay / funIts about YOUIllustrations showing consequences

    Encourages self-motivated learning, exploration

  • Design choicesDerive from connections in the pattern languageAlternative patternsOptional patternsChoices not limited to those in the pattern languageLess desirable alternativesSpeculative versus Known

    Explore the multiverse

  • Example1You 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

  • Example2 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.

  • Example3 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!

  • Example4 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

  • Exploring design spaceRead one full story, making choicesDigest outcomeGo back to the start, repeatSkim read highlighted sentences, phrasesTry different paths, with different outcomesReflect

  • Interactive pattern story creationStart with a linear story Derive from a pattern languageAdd a variation pointGuided by pattern textUndesirable alternativesAdd more to create a treeBranches may joinProvide just enough information

  • What if?Reading doesnt appeal? Branching narratives are not constrained to written format

  • Thank you for ListeningQuestions?

  • Interactive SessionJames Siddle, Kevlin HenneyACCU 2009

  • IntroductionBreakout groupsReading time 10-15 minsDiscussion time 20 minsCapture outputFlipchartsKey questions on handout formSide 1-feedback, Side 2-ideasSummary / Q&A

    Introduce speakersQuick skimHad idea for book of interactive design stories based on patterns about 18 months agoSlow gestation periodPaper workshopped at europlopNow taking next step3/5 mins to hereIntroduce speakers

    ************Introduce speakers

    Language of patterns good/desirable solutions, refer to each other in uses or follows relationshipsPattern sequence describes a collection of patterns known to have workedPattern story describes one particular design

    5/15 mins to here (start)~7.5/15 to start of this slideYou win but its not black and whiteYou lose though its not black and white12.5/15 to end of example

    Linear story all good but still describing real consequences rather than everything is fine

    Variation point pattern text may suggest several alternatives for solving the same sub problem that appears when the problem has been solved.e.g. template method versus strategy versus interceptor

    V point 2 undesirable; null object example

    Branches may join where later story is unaffected

    Writing the story may suggest new patterns, refinements to the language

    Provide only enough information to allow a choice to be made; too much and the better choice may be obvious. Aim is to make reader think.Introduce speakers

    Key questions:Feedback what you learned, format likes/dislikesIdeas new story paths, new overall storiesCan also fill in form and send by email, would also be appreciated.