The problem with complex web UIs
With the rise of single-page web applications, it became a must to be able to manage the growth and complexity of a JavaScript codebase. The same applies to ClojureScript.
In an effort to manage this complexity, a plethora of JavaScript MVC frameworks have emerged such as AngularJS, Backbone.js, Ember.js, and KnockoutJS to name a few.
They are very different, but share a few common features:
Give single-page applications more structure by providing models, views, controllers, templates, and so on
Provide client-side routing
Two-way data binding
In this chapter, we'll be focusing on the last goal.
Two-way data binding is absolutely crucial if we are to develop even a moderately complex single-page web application. Here's how it works.
Suppose we're developing a phone book application. More than likely, we will have a model—or entity, map, what have you—that represents a contact. The contact model might have attributes such as name, phone number, and e-mail address...