What problem does backbone.js solve?

I find the question perfectly valid and from my point of view there is nothing wrong with inquiring about the potential use cases of a library/toolkit.

What Backbone.js does (so do several other javascript mvc implementations) is that it provides a means of organizing the code into a modular pattern known as MVC pattern which is all about separating your code into three loosely coupled layers:

  • Model layer dealing purely with data and associated operations
  • View layer being the presentational aspects
  • Controller layer being the binding glue layer

(different frameworks deal with this differently : Backbone implementation of controller layer comprises of client side routing capabilities).

So, on the whole backbone provides you an infrastructure using which you can deal with data through models which contain encapsulated within them the data and associated validations, which can be observed ie. you can bind events to change events.

The View layer is mostly left for the user to separate the ui into manageable isolated sections.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)