Hi everybody. Today we will be speaking about Webix ways to optimize server-client communication in case of huge data. Those of you who are happy to fetch long datasets at once, please raise your hands!
Just as I’ve expected, nobody’s here. Everybody has gone to dynamic loading which is implemented very easily with Webix data components.
view:"datatable", url:"mydata.php", datafetch:100
});
Initially, a limited number of records (e.g. 100) is loaded, while further requests are triggered by scrolling or paging automatically. Guys, isn’t it nice?
Still, such a pattern requires quite a specific format of a server response – {data:[ /*array of records*/], pos:0, total_count:100 } – and you may ask yourself: “So what should I do, if I cannot tune the response or I don’t know the total length of server-side data?” Indeed, there are lots of web services that do not provide such information.
The article below shows the solution that relies totally on Webix public API and can be built by any of you.