Wow, it is just awesome that you guys both happened to be on this list! Thanks for all the interesting links!
_Nick_ On Thu, Dec 16, 2010 at 5:06 AM, Torbjörn Lager <[email protected]>wrote: > Hi Jacob, > > I totally agree with what you are saying about the problems of > developing complex user interfaces. And thanks for the reference to > the Beaudoin-Lafon paper. Another very good reference is Ian Horrocks > book: > > > http://www.amazon.com/Constructing-User-Interface-Statecharts-Horrocks/dp/0201342782 > > BTW, I am one of the authors behind the SCXML standard, and three > years ago I implemented my own JavaScript SCXML interpreter, in order > to test out some ideas. You may want to give it a spin: > > http://www.ling.gu.se/~lager/Labs/js-scxml/ > > Good luck with your thesis! > > Best regards, > Torbjörn Lager > > > On Thu, Dec 16, 2010 at 11:07 AM, Jacob Beard <[email protected]> > wrote: > > Hi, > > > > I'm currently writing my master's thesis on how state machines can be > > used to describe complex user interface behaviour. Michel > > Beaudoin-Lafon has a good paper on the motivation for this: > > > > http://portal.acm.org/citation.cfm?id=989865 > > > > To summarize, most general-purpose programming languages are > > fundamentally at the wrong level of abstraction for describing certain > > kinds of user interface behaviour. Consider the example of > > drag-and-drop behaviour. To implement this in JavaScript, you would > > likely register three callback functions, for mousedown, mouseup, and > > mousemove, respectively. You would also keep a variable outside of > > these functions to keep track of changes in application state between > > these callbacks. You would probably end up with something like the > > following snippet: > > > > > > var state; > > > > node.addEventListener("mousedown",function(e){ > > state = "DRAGGING"; > > },false); > > > > node.addEventListener("mouseup",function(e){ > > state = "IDLE"; > > },false); > > > > node.addEventListener("mousemove",function(e){ > > if(state === "DRAGGING"){ > > //move the node based on e > > } > > },false); > > > > > > > > The problem is that this approach does not scale very well as > > applications become increasingly complex, especially for applications > > that involve a complex notion of state. The reason for this is that, > > what conceptually is a single interaction (drag-and-drop) is broken up > > across a number of callbacks which are not explicitly linked in the > > syntax of the language. What you would like is to be able to describe > > the drag-and-drop interaction holistically, but what you end up with > > instead is a spaghetti of callbacks linked by global variables. > > > > A language at the right level of abstraction would be able to encode > > explicitly the notion of the state of an object changing in reaction > > to events. Finite state machines or Statecharts provide such a > > language, and in fact, state machines have a long history of use in > > human-computer interaction research to describe user interface > > behaviour. > > > > In order to use Statecharts in the web environment, they must first be > > compiled to JavaScript. This is the motivation for my project, > > SCXML-JS, an optimizing Statechart-to-JavaScript compiler. This work > > is still under heavy development, but more information can be found at > > the following links: > > > > http://commons.apache.org/sandbox/gsoc/2010/scxml-js/ > > > http://www.svgopen.org/2010/registration.php?section=abstracts_and_proceedings#paper_45 > > > http://www.svgopen.org/2009/registration.php?section=abstracts_and_proceedings#paper_36 > > > > If anyone has any questions about this work, please feel free to > > contact me off-list, or on the Apache Commons mailing list. > > > > Cheers, > > > > Jake > > > > -- > > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > > > To unsubscribe from this group, send email to > > [email protected]<jsmentors%[email protected]> > > > > > > -- > Torbjörn Lager > Professor of General and Computational Linguistics > Department of Philosophy, Linguistics and Theory of Science > University of Gothenburg > Box 200, SE-405 30 Gothenburg, Sweden > Phone: +46317864413 > > -- > To view archived discussions from the original JSMentors Mailman list: > http://www.mail-archive.com/[email protected]/ > > To search via a non-Google archive, visit here: > http://www.mail-archive.com/[email protected]/ > > To unsubscribe from this group, send email to > [email protected]<jsmentors%[email protected]> > -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
