03Jul

The DOM as State Repository

Posted by Elf Sternberg as Uncategorized

Ingo Schramm, jumping further into the wrangling over whether or not we should move past jQuery into architectures of things like Backbone or Dojo, proposes that we accept that all of this is about state: the state of the page, the state of the session.  In his post, MVC, MOVE – Or Simply A State Machine?, he argues the acrimony over acronymic choices comes down to the “simple” realization that we’re talking about state.

So, let’s go one step further.  The page is state.  Period.  Every function is a transformation, and every event invokes a function.  At the end of the function, the entire state has been processed and a new view of the data shown to the user.  Every function is built of smaller functions that help the transformation understand the current state, effect its transformation, and render the result. We could write this in Javascript, or some modern equivalent. Maybe we could write it all in Haskell. Wouldn’t that be fun?

Either this is a step back to 1999, or a step forward to Zed Shaw’s vision of a web without OOP.

Comment Form

Subscribe to Feed

Categories

Calendar

July 2012
M T W T F S S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031