[Pkg-javascript-commits] [backbone] 139/211: expanding the FAQ for MVC with a direct Rails comparison.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:00:15 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit bbf28b82a2de0112c9dfa0f1d20202a70c78f9a1
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Thu Apr 28 11:11:17 2011 -0400

    expanding the FAQ for MVC with a direct Rails comparison.
---
 index.html | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/index.html b/index.html
index 3a54075..14dcc55 100644
--- a/index.html
+++ b/index.html
@@ -2097,6 +2097,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>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list