kadamwhite/backbone-wordpress-demo — pull request #11 by kadamwhite (2013-08-15 18:50:35+00:00)
Title: Use a Backbone Model/View pair to render the featured artwork

While this is undeniabley more code, the coupling between the data and view logic has been reduced:

* Data setting happens exclusively within the `artwork` model instance
* Rendering and view state changes happen exclusively within the `featuredArtwork` view instance
* Changes to `artwork` automatically update the view via Backbone events
* Detect when the gallery is first shown using the presence of `artwork.id` instead of a DOM lookup