Skip to content

Commit

Permalink
adding a section to the Backbone FAQ on extending...
Browse files Browse the repository at this point in the history
  • Loading branch information
jashkenas committed Jan 30, 2012
1 parent ac580ca commit a2ab3b1
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
<li><a href="#FAQ-tim-toady">More Than One Way To Do It</a></li>
<li><a href="#FAQ-nested">Nested Models &amp; Collections</a></li>
<li><a href="#FAQ-bootstrap">Loading Bootstrapped Models</a></li>
<li><a href="#FAQ-extending">Extending Backbone</a></li>
<li><a href="#FAQ-mvc">Traditional MVC</a></li>
<li><a href="#FAQ-this">Binding "this"</a></li>
<li><a href="#FAQ-rails">Working with Rails</a></li>
Expand Down Expand Up @@ -2890,6 +2891,25 @@ <h2 id="faq">F.A.Q.</h2>
&lt;/script&gt;
</pre>

<p id="FAQ-extending">
<b class="header">Extending Backbone</b>
<br />
Many JavaScript libraries are meant to be insular and self-enclosed,
where you interact with them by calling their public API, but never peek
inside at the guts. Backbone.js is <i>not</i> that kind of library.
</p>

<p>
Because it serves as a foundation for your application, you're meant to
extend and enhance it in the ways you see fit &mdash; the entire source
code is <a href="docs/backbone.html">annotated</a> to make this easier
for you. You'll find that there's very little there apart from core
functions, and most of those can be overriden or augmented should you find
the need. If you catch yourself adding methods to <tt>Backbone.Model.prototype</tt>,
or creating your own base subclass, don't worry &mdash; that's how things are
supposed to work.
</p>

<p id="FAQ-mvc">
<b class="header">How does Backbone relate to "traditional" MVC?</b>
<br />
Expand Down

0 comments on commit a2ab3b1

Please sign in to comment.