backbone.js - How to update backbone model from database -


i creating webpage show listing database table, suppose database table updating in every 10 second php cron , want sync backbone model/collection whenever database table update php cron.

example:- have table stock_exchange in storing stocks rate various companies, , cronjob update stocks rate in every 10 second, show on ui creating backbone application problem whenever table stock_exchange updated want sync backbone model/collection.

please help, in advance

you can either poll server calling stockmodel.fetch() every 10 seconds in browser (via setinterval perhaps), or can use web sockets (via socket.io perhaps) allow server push latest data browser, can stockmodel.set(datafromserver);. try , post code stack overflow intended specific problems not tutorials.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -