2

Both of these have pretty vague descriptions,

Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.

and Boilerplate.js,

BoilerplateJS provides reference architecture to take the pain out of large scale JavaScript development. BoilerplateJS is a collection of product engineering patterns, and some solid integrations of industry-leading JavaScript libraries.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
  • 1
    It says it right there on the http://www.boilerplatejs.org front page, under the heading "This looks great... but what about knockoutjs and backbonejs?" – jevakallio Mar 07 '13 at 20:26
  • And how is that at all descriptive, *BoilerplateJS does NOT reinvent your wheels!!!* what wheels? What does backbone reinvent? Then it reiterates this vague point, *"we are NOT attempting to replace any of the established libraries that you already use and love."* **What libraries!!** Then it continues with the same marketing text, *"what BoilerplateJS provides is a reference architecture that demonstrates the best practices for integrating your libraries for large scale product development."* – Evan Carroll Mar 07 '13 at 20:29
  • I agree that the BoilerplateJS website is very uninformative, and moreover, the whole thing looks like a bit of a mess. How I understand that text is: *BoilerplateJS is a boilerplate project for creating JS applications. It describes patterns and a way of organizing your code in a way that scales for large-scale product development. It includes some libraries, but it does not aim to replace your existing stack. Feel free to use the patterns and organization of BoilerplateJS with your favorite framework.* – jevakallio Mar 07 '13 at 20:35
  • Right, but logically it's more than a folder structure, and moreover it ships with standard libraries. As a user, I just want to know what folder-structure and stack (or, suggested modules as Boilerplate may prefer) I use. How do these two modules compare? It's not just Boilerplatejs that has bad docs, in my mind Backbone does too. It's equally as vague. I feel pushed by both of these into using Angular which is the only one that it makes it apparent what it actually *does* for me. – Evan Carroll Mar 07 '13 at 20:40

2 Answers2

7

Backbone is an MV* JS library. It does model event binding etc. It isn't prescriptive about how you structure your project.

Boilerplate is a reference application structure bundled with some popular libraries which you may or may not want to use with the emphasis on adapters to decouple your AMD modules from directly tying to a specific library. It actually comes with Backbone and Knockout included in separate components to demonstrate isolating the components and using different MV* frameworks in the same app. As a result, boilerplate itself does not handle event binding (that's what it brings in Backbone or Knockout for).

Boilerplate sees itself as the tree with backbone/knockout as the leaves.

Backbone sees itself as the tree and leaves but it offers no assistance on how that tree is structured, so its more like a cane against which you have to construct your own tree.

At least that's how I have it organized in my head....

wheel.r
  • 211
  • 1
  • 4
  • Welcome to StackOverflow @endscow. That's a beautiful answer and exactly what I was looking for. I wonder why Boilerplate says no where that it includes Backbone. – Evan Carroll Mar 07 '13 at 23:00
  • It is mentioned but buried: [boilerplatejs](http://boilerplatejs.org/) _As proof, due to popular demand, we have incorporated (from v0.2rc) an exmaple of backbonejs side-by-side with knockoutjs for creating UI components._ – wheel.r Mar 07 '13 at 23:09
0

Boilerplate.js is the collection of best practices using a design pattern with the use of defined namespaces that would help you to protect our code. It is developed in a modular way with commonly used utility methods provided that you would find useful for common operations. It is equipped with the configuration file in the form of an object literal that can be used to store global objects, config ids, URLs or textual strings. This framework has been designed to work as a ready to use template that you can build further in your projects as needed as it outlines the framework neatly and exhibits an approach to extend it.

Backbone.js is a JavaScript library with a RESTful JSON interface and is based on the model–view–presenter (MVP) application design paradigm. It is termed as lightweight, as its only dependency is on one JavaScript library, Underscore.js. It is designed for developing single-page web applications, and for keeping various parts of web applications (e.g. multiple clients and the server) synchronized. Examples of major web applications built on Backbone.js are BitTorrent.com, LinkedIn Mobile, Pinterest and Sony Entertainment Network.