No. 4 is something which I've solved in Backbone.js with about 50 lines of (commented) code. It's a pretty simple setup inspired by Rails and it has solved this problem in all use cases I've had. I've put it in a Gist here: https://gist.github.com/2762417