In the development of background management system data comparison, the front end is used Ajax, too much, what harm? How to improve?
Reply content:
In the development of background management system data comparison, the front end is used Ajax, too much, what harm? How to improve?
The front-end basically does not io,ajax is the absolute main communication way.
Consider it, an AJAX is a request, too much of the request nature will affect performance, but Ajax if a one-time request for a lot of data to the page parsing is also very troublesome.
A page will definitely involve a lot of data, how to split the data, all aspects to consider, writing efficiency, UI interaction and so on.
In general, it depends on experience, how to do the minimum unit processing.
Magento2 a lot of use of Knockoutjs, a lot of data from Ajax, it will be a good reference.
The most common problem is the architectural design of large number of requests and local data refresh.
The above problems need to have a more macroscopic architecture design to solve.
Did not feel the Ajax has what bad effect, have the question to let the spa how to live?
From the perspective of user interaction, Ajax benefits More, increasing user experience
Standing in the request concurrency angle, it is not good, but can also be resolved through the cache, of course, the server side will generally do.
Now the development of the background management system should not be all from JS route, do single page? Why is there an AJAX statement like that?
CSS Sprite (CSS Sprite) technology that fits multiple icons into one image is designed to reduce network requests.
It can be seen that reducing network requests improves performance on both sides of the browser and server.
Too much Ajax means more network requests, and obviously too much is bad.
But Ajax with some background page, the message notification, the experience is still good.
If it is a front-and-back separation, Ajax is a key way to communicate, you have to deal with the asynchronous control process of Ajax