开发者

Difference between Backbone.js and Jquery

I'm just getting started with backbone, based on what I read, I couldn't tell the difference. Here is a descriptio开发者_StackOverflow社区n from backbone's website

Backbone supplies structure to JavaScript-heavy 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 application over a RESTful JSON interface.

Doesn't jQuery do event binding, etc nicely already?

What purpose does backbone serves?


What purpose does backbone serves?

Backbone supplies structure to JavaScript-heavy 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 application over a RESTful JSON interface.

jQuery is a DOM manipulation library.

Backbone allows you to organize and structure your code into data and presentation.

It also gives you access to _ which has an awesome set of functional utilities and it hooks up your data to a REST API.


Backbone is more of an organizational framework and helps you organize your application in an mvc pattern. It is not a utility set or a toolkit and as such does not provide you actual functionalities and as such it does not enable you do more things which you couldnt already do with jquery. Rather it provides some some pre-defined objects Model, Collection,Controller etc. which you can conveniently extend to set up your application according to an opinionated MVC pattern. On top of that it provides a client side routing functionality which serves a dual purpose of providing a navigational facility as well as backbutton support without having to meddle with the History api.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜