Currently transitioning a Rails 3.2+ app over to using Backbone.js to manage its front-end. Pre-transition, the app has several layout partials rendered within application.html.erb. To visualize, think grooveshark - with its left column and footer, where all navigation happens in a central content area. Point being, the content in the left/right columns, footer and header is not static.
Here's what I was thinking an application.jst.eco could look like. Where each commented line is a place another template could be rendered.
<!-- layouts/header -->
<div class="row-fluid">
<div id="left-column" class="span3">
<!-- layouts/left_column -->
</div>
<div class="span6">
<section id="content">
<header>
<!-- notices -->
</header>
<!-- main content -->
</section>
</div>
<div id="right-column"class="span3">
<!-- layouts/right_column -->
</div>
</div>
<!-- layouts/footer -->
How should I go about organizing templates in Backbone to replicate my application.html.erb structure? Am I even thinking in the right direction with this?
Further, I'm confused about the entry point of the Backbone application. Since I'll still be making a <%= yield %>
call in application.html.erb, and pre-loading home page data through an erb view, how would this all come together if the greater layout is defined in Backbone templates?