Ajax:
- + no double messages when updating the browser
- + client side execution
- + less server requests
- - additional security checks / configurations regarding XSS attacks
HTML:
- + works in all browsers
- + works when javascript is disabled.
- -decrease in usability in terms of speed
I just spend little time on Spring, so I can't judge everything. Perhaps the Spring development model itself is causing a feeling of inconvenience. In Java, you are used to feeling like in OOP. The general concept of MVC is mixed with html AJAX, etc. Remember that you have a server / client architecture and would like all components to be great. This is something that can be very well done with the Google Web Toolkit.
So, I read that you are updating the browser. Where is the advantage of AJAX if you make an upgrade? Not knowing your application, but knowing that some things cannot be easily implemented in Java (if you adapt external code), you are doing the right thing and should think about your program sequences.
The only other way besides HTML AJAX that I can imagine is with a Socket connection that can be done using the ActiveX component, Flash, or the html5 websites. But, as a rule, this is not what you use for simple forms.
BTW. A GET string is known to have a maximum of about 2000 characters, but a bit faster in execution because you are not sending headers such as POST.
And in my speech. In terms of performance, itβs better to have fewer requests and spit out more html first than try to force yourself to just do ajax everywhere. Since you still lost your SEO advantage .....
Dr. Dama
source share