Backbone JS save collections

Backbone JS save collections

I see a lot of confusion on the interweb about this process, and a lot of outdated answers on sites like stack overflow (though, the process is still 99% accurate). So, I thought I would put out some good karma out into cyberspace in the hopes that I’ll save someone some time on this subject one day. It’s very simple to save your Backbone collection via CRUD/REST.

When you call the save(); method on your collection it will send a PUT method request to the defined URL (whatever it may be) and then you can handle that request however you normally do in the language you’ve chosen for your back-end.


About David Parlevliet

Dave is long time developer with a passion toward teaching. He divides his time between his wife, her cat and his projects. He recently started using twitter so make sure to follow him!