backbone.js attaching multiple Routers to the same route
Recently I had need to attach multiple backbone.js Router objects to the same route; the purpose was to create a page which could have multiple sections that were unaware of each other, since the path gave them all the information they needed. This allowed a much looser form of coupling and gave us a bit more of a MVP feel rather than a traditional MVC.
However, after a lot of discussion we ended up scrapping this plan for a slightly different one. I had already written a patch to make backbone.js routers support multiple route handlers, though, and I didn’t think it made sense to just throw it out, so I’ll provide it here. Keep in mind that this may not work with future versions of backbone.js!
So, without further ado, here it is:
[gist id=1223417 bump=3]