Could you, please, give me advice on datacollection update.
I want to automaticaly update datacollection (because other users may change some database records) and I want to automaticaly see the changes. What is the best way of doing it? Make a timer and call datatable.load()? Or maybe there are some better approaches?
There are two question here
a) sync between datacollection and server side
b) sync between different widgets and datacollection
(a) there are few strategies here.
- call load with timeout ( simple but expensive )
- use websocket and custom backend
- use a specialized DB on server side
(b) is simple, you can use a .sync API
$$("table").sync(mycollection)
P.S. If you have only one widget synced to datacollection, you can omit datacollection usage at all, and apply all data loading to the widget in question.
Thank you, very interesting.