The Model-View-Controller (MVC) approach to user interfaces was first
proposed by Trygve Reenskaug in a 1979 Xerox PARC note. As Object
Oriented methodologies gained popularity, MVC too gained traction as a
natural and logical way to construct user interfaces despite obvious
short comings. Even though OO researchers moved forward with
alternative approaches likes Morphic and constraint based systems, MVC
today maintains a strangehold on developer approaches to UI.
Can functional programming take the good lessons from MVC while
advancing the state of the art? Functional Reactive Programming and its
derivates primarily solve complexities around events – what of component
modularity and abstraction?
We’ll examine how a new library for ClojureScript called Om, a simple
functional layer over Facebook’s React, makes some traditional hard
problems in MVC based UIs simple without abandoning the abtractions OO
programmers find useful. These concepts are easily portable to other
systems provided the presence of persistent data structures.
The Functional Final Frontier