开发者

Looking for a fully functional Rails application using Backbone.js

Backbone.js website has some examples. But barring the first one others are not open source. I am looking for a fully functional (meaning it just works) Rails application to study. The app does not need to have too many functionalities. I looked at 开发者_如何学Cgithub and all the apps are broken in some ways.


Recently i found https://github.com/malclocke/fulcrum and it seems to be the best Rails/Backbone example but its not mentioned on the backbone website. Its also a very functional pivotal tracker clone.


I have been working on some non open source projects that use a Rails and Backbone.js stack. Both frameworks can be integrated fairly easily. Of course, it depends on how the application is setup and how you configure each framework to control more or less business logic.

To get both frameworks to play with each other:

  • Make Backbone collections and models for each Rails model
  • Route resources for each Rails model
  • Setup the URL property for the Backbone collections and models to work with your rails routes
  • Use fetch() and save() in Backbone to get and post data with Rails


I wrote a german language noun trainer using RAILS and backbone.js. It was done a long while ago while I was still learning but you can peek at it if you want.

https://github.com/bradphelan/ohmyderdiedas


I've been actively working on Myelin: http://sourceforge.net/projects/myelin/ (funded from a corporate source)

There are some caveats:

  • This is essentially a first for me with every technology in there... from rails, to backbone / jquery / rspec... you name it... it's new, so take the code with some grains of salt ;)
  • I didn't use the Backbone routing, and built a very simple 'router' of my own.
  • You'll need ganglia and rrdtool installed (macports if you're on a mac should work)
  • You'll need to alter the development config for sure.
  • The models, are (mostly) straight up backbone, and I use sync often in the controllers so those should be pretty good examples.
  • The views are a little more chaotic.

If anyone needs help with anything, just drop a line to me on sourceforge.


There's now a gem in development that provides generators, called rails-backbone. It's Open Source and getting better every day. As of today it's up to date with current Rails 3.1 (actually 3.2 now), esp. including Asset Pipeline, which is very relevant to backbone.js.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜