Lively Object Groups
Tim Felgentreff, Philipp Tessenow, Lauritz Thamsen Jens Lincke, Prof. Robert Hirschfeld Software Architecture Group Hasso-Plattner-Institut Potsdam www.hpi.uni-potsdam.de/swa 2012-07-25
The Lively Kernel
Browser-based development platform - written in HTML and JavaScript - self-sufficient system and tools - module systems, Morphic architecture, visual connectionsClassical development - classes, traits, layers - Smalltalk-inspired tools ■ Explorative development - composition of visible morphs - per-object scripting - object serialization ■ PartsBin objects repository - share created objects and applications
Freedom Of Speech
Debating adventure - characters find paths through the world - characters interact with each other - player insults other characters to defeat them Explorative development - created parts instead of classes - exchanged parts through the parts bin - reused parts by delegating instead of building class hierarchies
Hey, look over there!
He must have taught you everything you know.
things that don't talk, don't taste good
Explorative Development
Direct manipulation Immediate feedback Morph compositions
// this.doitContext = this.get('Boy') // ... if (correctAnswer === answer) { asker.nextTurn(this, asker) } else { this.getHit(); if (!this.isDead()) { asker.nextTurn(asker, this) } } // ...
I have never lost a melee!
Change Propagation
■ Object manipulation only works one object at a time
this.selectedMorphs.forEach(function (ea) { ea.setScale(2) })
Code Re-use in Similar Objects
■ No object-centric way for shared behavior
this.selectedMorphs.forEach(function (ea) { ea.addScript(function isObstacle() { return false; }) })
Scene-Graph
■ No mechanisms for browsing part compositions
this.owner.owner.owner // Parts Bin
Workspace
X
M
Association between Tools and Morphs
■ Ambiguous connection from code editors to objects
Scripts
+
-
undefined
OgreCharacter3
Target:
Tag:
all
ObjectEditor
X
M
Explorative Development - Conclusions
Pros - Fast development - direct manipulation - immediate feedback - morph composition Cons - Difficult maintenance - change propagation to similar objects is often manual - code-reuse between logical "classes" is hard - behavior is hidden within the scene graph - connection between tool and object is ambiguous
Enhanced ObjectEditor
Scene graph - explore scene-graph - direct element selection Change propagation - changes propagate to all group elements Code re-use - view / edit common scripts on all group members Usability - shortcut to edit objects / groups - select groups visually: magnifier or selection - evaluate do-its on every group member - name and save groups for later use
Limitations
Persistent Groups - no explicit group objects - group membership saved on morphs - group selection only incorporates visible morphs Group Scripts - tools do not distinguish between individual and group scripts
Scripts
+
-
undefined
Tag:
all
run
Name group
Villains [2]
ObjectEditor (WebDev'12)
X
M
Conclusions
Explorative development problems - change propagation to similar objects is often manual - code-reuse between logical "classes" is hard - behavior is hidden within the scene graph - connection between tool and object is ambiguousWe improved working on multiple morphs - multiple live objects can be edited simultaneously - groups enable trait-like, object-centric views - scene graph is visually explorable - magnifier links morphs and code
Sources
Hopscotch: Towards User Interface Composition, Bykov, WASDeTT, 2007 ■ The Lively PartsBin: A Cloud-based Repository for Collaborative Development of Active Web Content, Lincke, Krahn, Ingalls, Röder, and Hirschfeld, HICSS, 2012 Method and apparatus for enhancing computer-user selection of computer-displayed objects through dynamic selection area and constant visual feedback, Osga, Glenn, US Patent No 5757358 ■ Bret Victor - Inventing on Principle, CUSEC, 2012 http://vimeo.com/36579366, retrieved on May 14, 2012 ■ Do We Really Need to Extend Syntax for Advanced Modularity? Shigeru Chiba, Michihiro Horie, Kei Kanazawa, Fuminobu Takeyama, Yuuki Teramoto, AOSD, 2012