Search code examples
javascriptjqueryuser-interfacebackbone.js

Complex UI structure and backbone js


I'm not able to wrap my head around templating a complex UI. It all makes perfect sense when following (the almost canonical) todo mvc example, but my challenge is how to tame a UI where the elements of the model may be strewn all over the page?

Please consider the image below, the aha moment is just proving elusive: enter image description here

A template encapsulating this would be huge and unwieldy. What is the correct way to tackle such a challenge?


Solution

  • Divide and conquer. One view to hold multiple sub-views with whom you should share the model(s). As you can see here in one of my backbone project, each red rectangle is a distinct view.

    Backbone multiples views