Backbone.js versus Spine

194 views
Skip to first unread message

DJ

unread,
Feb 7, 2012, 3:02:52 PM2/7/12
to CodeMash
CodeMash'ers

Unfortunately I didn't attend any of the Backbone.js talks and wishing
I would have now! DOH!

Does anyone have experience using either framework? I've been playing
around with Spine and debating looking into Backbone.js.

Basically, I'm trying to integrate Spine's sample Contact application
with a backend Ruby REST API.

Peter Bell

unread,
Feb 7, 2012, 3:08:10 PM2/7/12
to code...@googlegroups.com
From everything I've been able to gather, general rule of thumb:
- Backbone is optimized for integrating with RESTful back ends
- Spine is optimized for local storage

It's not that you can't integrate spine with a back end, but it is focused on immediate actions so it'll show the item deleted before the server confirms that it is - leaving you with a UI conundrum if the delete fails some kind of business rule constraint.

Most tutorials for spine are "shopping cart" style local persistence examples and for that use case I think spine is slicker than backbone. Backbone integrates with RESTful services out of the gate though.

I like both frameworks, but I'd thoroughly recommend backbone for integrating with a rails back end. The Thoughbot team have even written a "Backbone with rails" ebook providing a good hands on tutorial

Best Wishes,
Peter


--
You received this message because you are subscribed to the Google Groups "CodeMash" group.
To post to this group, send email to code...@googlegroups.com.
To unsubscribe from this group, send email to codemash+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codemash?hl=en.


Chris Nelson

unread,
Nov 7, 2012, 12:04:39 PM11/7/12
to code...@googlegroups.com
So we've been using backbone.js for awhile and a few months back decided to try building an app with Spine. We saw some very strange behavior in Spine with how it was implementing it's Identity Map. I won't go into details now, but the net effect was that listening to events on a new model instance and then persisting resulted in the event listeners being lost. This made Spine a non-starter for us. At this point I feel like most of the things that made Spine interesting have already been implemented in one or multiple backbone extension projects. <shameless plug>I'll be talking about several of these in my talk</shameless plug>
Reply all
Reply to author
Forward
0 new messages