I've been developing a web application for a few months. Until now I had always painted with the asp controls and to avoid the load I used update panels. But I have found that here using .net what they do is call the functions in the aspx file from ajax to avoid the postback. It seems quite strange to me, and I would like to know which of the two is more optimal,
- Paint an asp:gridview in the databind
- Paint a table with ajax call to aspx with JSon response and paint it with bootstrap table.
In principle, visually I do see the quick response, but the number of ajax calls that have to be made... is it worth it? Is it optimal to use with .Net or is it better to apply it with other languages like php for example?
What they tell me is that in the end, after the asp controls, there ends up being the same thing that we do by hand... So?
In summary, technically speaking, which is better for data load optimization of a large data table and form application?
I would say that one of the main disadvantages is the weight of the server's response, if it is for comparison, when using ajax you only make a request to the server and return, for example, a json object (you can also return html or another type of data), which, together with an updatepanel that is loaded as html on the server and not only that but also the viewstate and who knows what else, makes the response huge, with this the performance of your application is also affected.
Although the use of updatepanels makes asynchronous communication with the server very simple, if it makes many requests in a row, the size of the data transferred is considerably larger than in more modern use with js. Not to mention that a view or aspx with multiple updatepanels becomes unreadable.
Another advantage for me is that directly handling the javascript and html of a page makes it easier to manipulate since, as you mention, the aspx controls are finally normal html wrappers, it also facilitates the maintenance or scalability of the page.
On the other hand the standard is to use ajax nowadays. .NET has been advancing more in technologies like mvc or web api which are clearly made to work with ajax, with this you manage to take weight of server processing and shift it to processing on the client machine. also if you want to use current libraries like angular, react or vue the standard would be to start making ajax requests from the client. either with promises or observables, which are also important developments in the area of web development.
I used UpdatePanels for a long time, today I realize that I use them more than I should :)
I leave you a link with more information regarding the same.
http://lprocksit.blogspot.com/2012/05/aspnet-ajax-updatepanels-are-very.html
In short, the use of javascript from the client is more optimal.