Bulk Updates
Bulk updates help keep our Ajax applications running more efficiently by keeping the number of database requests down. This is because large amounts of data can be sent as an array, XML, or JSON rather than separate XHRs. This data can be deleted from, saved to, or inserted into the database as one SQL query. Imagine that we have a number of items we want to save to the database. These items could be user attributes, for example, such as names, descriptions, and so on. In most examples, requests are made with each of these attributes as separate key/value pairs. This solution works fine for simple XHRs that need to send only small amounts of data, but if we wanted to send data for multiple users, it would be much more efficient to ...
Get Ajax for Web Application Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.