<story><title>MVC, MOVE - Or Simply A State Machine?</title><url>http://ingoschramm.tumblr.com/post/26409997578/mvc-move-or-simply-a-state-machine</url></story><parent_chain></parent_chain><comment><author>amix</author><text>I think it&apos;s strange that people discuss &quot;MVC&quot; without specifying which MVC they talk about - - because most of MVC patterns are VERY different and used in very different contexts (e.g. Rails and Smalltalk). About a year ago I did a blog post about the history and usage of MVC* and for me it does not make sense to talk about MVC as a general pattern, because the implementations, contexts and ideas are very different from one MVC to another. If you want to discuss MVC please specify which MVC pattern you talk about.&lt;p&gt;Regarding this article I think it would be much better if the author provided some code for his &quot;state machine&quot; idea. Currently it&apos;s just a blurb of text and it&apos;s hard to imagine how his ideas would work in practice.&lt;p&gt;One framework I enjoy and use is Lamson - - Zed Shaw&apos;s mail server framework. It uses a state machine abstraction and it works quite well. This said, I think mail server processing is very suited for the state machine abstraction - - I am unsure how suited UI is, since it&apos;s a lot more complex than processing email.&lt;p&gt;* &lt;a href=&quot;http://amix.dk/blog/post/19615&quot; rel=&quot;nofollow&quot;&gt;http://amix.dk/blog/post/19615&lt;/a&gt;</text></comment>
<story><title>MVC, MOVE - Or Simply A State Machine?</title><url>http://ingoschramm.tumblr.com/post/26409997578/mvc-move-or-simply-a-state-machine</url></story><parent_chain></parent_chain><comment><author>gruseom</author><text>Yes! State machines are a natural paradigm for complex UIs.&lt;p&gt;Event handlers are great as long as they remain independent little globs of code: this button turns that thing off, this click makes that color different, etc. But once they start affecting each other at a distance (e.g., the button starts some action that temporarily changes the meaning of the click), you need a method of controlling the effects systematically or you end up with spaghetti. Pretty much every complex UI I&apos;ve ever seen is that spaghetti.&lt;p&gt;MVC is too simplistic to give this. M means &quot;state&quot; and V means &quot;what the user sees&quot; and C means &quot;just make it all work, mkay?&quot;, which lets you down right where you need an organizing principle.&lt;p&gt;I struggled with UI spaghetti for years before finally realizing that state machines are a nice systematic way to manage this complexity. Now it seems kind of obvious that UIs &lt;i&gt;are&lt;/i&gt; state machines. They&apos;re machines and they have state!</text></comment>