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…

 Dave

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!

Backbone Router: Nagivate to the previous route using Backbone.simplerouter

Backbone Router: Nagivate to the previous route using Backbone.simplerouter

There will come a time when you will need to send the user back one page in their history for whatever reason. I will show you how to do this using Backbone.simplerouter. The source Your project will need to be…

 Dave

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!

How to properly use Backbone.cachingSync on models

How to properly use Backbone.cachingSync on models

Backbone.cachingSync has support to be used with models directly, but that seemed to confuse me because your model would always be wrong if you do that, because when you define your model you’re meant to define the namespace for storage….

 Dave

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!

An unobtrusive Backbone cache

An unobtrusive Backbone cache

I did some research last night to save myself the trouble of having to implement my own Backbone caching system. I found Backbone.localStorage and Backbone.offline. Backbone.localStorage wouldn’t work for me properly. It wouldn’t do the initial fetch to retrieve and…

 Dave

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!

Making your Backbone.Router neat and tidy with Backbone.simplerouter

Making your Backbone.Router neat and tidy with Backbone.simplerouter

One thing that’s consistently bothered me about Backbone is the way that Backbone.Router works. I standardise all my page Backbone.View so that each instance loads and unloads exactly the same way, and I’m sure you and everyone else does too….

 Dave

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!

Mixing JQuery/Javascript events with Backbone Views

There are times when you will need to bind some events with JQuery, but you will want the results to come back to your Backbone object.  Like, if you need to bind a click element to something outside of your…

 Dave

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!

Backbone JS: loading external template files the PROPER way

Most recently I needed to store some of my Backbone templates server-side because of their size. They will be text/plain with nothing dynamic so Varnish will be able to cache and serve it quickly, but I will most likely version…

 Dave

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!