I have zero experience with Backbone.js currently, and before I start having a good look, I wonder if anybody could advise if it is a good fit for my use case.
I have a dashboard where I will present multiple real-time graphs, with the data source being provided a socket.io.
I would like to use the same data source on multiple pages of the dashboard.
Would backbones’s models be a good fit here i.e. setup a model that uses the socket.io data source, and then makes it available to all views?
Basically whenever socket.on is called, i need an object in each of the views to be updated.
Is this possible?
Any thoughts would be much appreciated.
Best regards, Ben.
Yeah, that’s possible. There’s a library for Backbone that replaces the Backbone.sync method with an implementation that works over Socket.IO:
https://github.com/logicalparadox/backbone.iobind