最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - backbone.js alternatives that plays ball with jQuery? - Stack Overflow

programmeradmin1浏览0评论

Are there any alternatives to something like backbone.js out there that provides some framework/structure to your front end javascript - but don't have any unwanted dependencies and are more closely married to jQuery?

Are there any alternatives to something like backbone.js out there that provides some framework/structure to your front end javascript - but don't have any unwanted dependencies and are more closely married to jQuery?

Share Improve this question asked Feb 3, 2011 at 2:45 arnorhsarnorhs 10.4k2 gold badges36 silver badges38 bronze badges 1
  • 6 Backbone has "unwanted dependencies" ? How could you not want underscore? It's the best library ever. P.S. tight coupling to jQuery sounds really painful to me. – Raynos Commented Jun 14, 2011 at 20:09
Add a comment  | 

6 Answers 6

Reset to default 20

Are you asking for an easy to use MVC framework? because Sammy.js seems to be by far the most easy RESTful framework with routes, managing hash changes, and templating plugins.

have you checked SproutCore

also JavaScriptMVC

Spine

I think there's only one MVC framework that is as fully featured and still even more puristic and that's Spine http://spinejs.com/. It's not so closely married to jQuery though since it's actually not dependent on any other library.

Spine vs. Backbone

The fundamental difference between Backbone is that Spine wants to abstract the server away completely so that none of the asynchronous calls are being waited, but that the application just continues it's work while the calls are done in the background. (http://spinejs.com/docs/introduction)

I would recommend everyone to have a look at ember.js.

Ember is much more of a high level framework with many useful features implemented implemented out of the box. For example:

  • Two way data binding
  • Computed properties
  • Auto-updating templates

On the other hand the fact that is higher level than Backbone makes it less flexible , thus less attractive for those javascript developers that like tweaking the system and getting their hands dirty.

For those interested you can find a great comparison between the two at: http://smus.com/backbone-and-ember/

I know this is a few days old now, as well as a shameless plug - but I am the author of AFrameJS, which plays well with jQuery. There are a lot of docs there, also some on shanetomlinson.com. The source is on GitHub. K Ivanov already mentioned JavascriptMVC, and then there is KnockoutJS. Ext, is a library that would replace jQuery, but is also an MVC library that contains a ton of pre-built widgets. There are a ton to choose from - a very good thing.

current version of backbone.js seems to work with zepto.js library

it's a lightweight alternative to jquery (it's less that a quarter jquery's size)

发布评论

评论列表(0)

  1. 暂无评论