7

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 github and all the apps are broken in some ways.

2
  • Have you tried the Peepcode screencast? I have seen it and it covers a lot of stuff peepcode.com/products/backbone-js Commented Jul 27, 2011 at 3:42
  • peepcode screencast does not send anything to server. It is all client side. This is about backbone basics. It seems peepcode will cover more advanced topics in part 2. Commented Jul 27, 2011 at 3:56

5 Answers 5

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

In general, Rails and Backbone 'just work'. Fulcrum has a few things that are worth looking at (I make no guarantee that Fulcrum is doing 'the right thing' in any of it's behaviour). Check out the file public/javascripts/backbone.rails.js for how to modify Backbone to send wrapped parameters to Rails (taken from gist.github.com/719080). Also the StoryView.saveEdit() method is worth looking at for how to handle ActiveRecord errors.
0

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

Comments

0

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

Comments

0

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.

2 Comments

Why not on the github? I see that the sourcecode not available for view.
Client wanted it on sourceforge shrug. It seems like you can grab the source to me? You can grab (read-only) from here: git://myelin.git.sourceforge.net/gitroot/myelin/myelin or browse the source here: myelin.git.sourceforge.net/git/gitweb-index.cgi
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.