AJAX is a technology that has been advancing far more rapidly than any others. Most of the web applications these days make use of AJAX.
AJAX is Javascript based. So, a programmer has control over a page without really having to know too much in details about Javascript. It has made AJAX a popular choice for those who want to make use of Javascript but hate to learn it.
Using AJAX together with dynamic HTML make your web pages more stylish, appealing & sleek. Because you can update the view according to users' choices, it is much easier to do the customization of the pages.
Recent development in AJAX technologies has incorporated other features and hence made AJAX based framework a better choice in creating web-based applications where MVC structure is used.
I use RichFaces which is a framework that combines JSF & AJAX. Even though RichFaces provides us with all of the advantages that I aforementioned, AJAX is not necessarily the best solution sometimes. Why? I can list a few complaints here.
It is true that AJAX makes customization a lot easier. But it has a price on the side of performance. If you make a lot of AJAX calls which update the pages, depending on the way you interact with the page, it can cause troubles. In my cases, I have experienced lost of data because of multiple re-rendering of one page. In fact, troubles with RichFaces are big ones. If you do not prevent from multiple methods being called simultaneously, you are likely to run into the conversation timeout error. So, when you design your application, you need to make sure that a second method is not called unless the first one finishes.
RichFaces is good but let's face it. It's still built on top of Javascripts. So, if you want to change something in depth, you still need to learn about Javascripts. If you look at a lot of RichFaces tags, you can still see that their attributes still make use of a lot of Javascripts.
I'm not saying that you should totally avoid using RichFaces AJAX. Just be aware that there're some pretty serious downsides to it once you start using it a lot.
No comments:
Post a Comment