mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-24 14:27:56 -05:00
Merge branch 'gh-pages'
This commit is contained in:
28
index.html
28
index.html
@@ -2217,6 +2217,34 @@ Inbox.messages.fetch();
|
||||
represents a logical chunk of UI, responsible for the contents of a single
|
||||
DOM element.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Comparing the overall structure of Backbone to a server-side MVC framework
|
||||
like <b>Rails</b>, the pieces line up like so:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<b>Backbone.Model</b> – Like a Rails model minus the class
|
||||
methods. Wraps a row of data in business logic.
|
||||
</li>
|
||||
<li>
|
||||
<b>Backbone.Collection</b> – A group of models on the client-side,
|
||||
with sorting/filtering/aggregation logic.
|
||||
</li>
|
||||
<li>
|
||||
<b>Backbone.Controller</b> – Rails <tt>routes.rb</tt> + Rails controller
|
||||
actions. Maps URLs to functions.
|
||||
</li>
|
||||
<li>
|
||||
<b>Backbone.View</b> – A logical, re-usable piece of UI. Often,
|
||||
but not always, associated with a model.
|
||||
</li>
|
||||
<li>
|
||||
<b>Client-side Templates</b> – Rails <tt>.html.erb</tt> views,
|
||||
rendering a chunk of HTML.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p id="FAQ-this">
|
||||
<b class="header">Binding "this"</b>
|
||||
|
||||
Reference in New Issue
Block a user