In 2005, Jesse James Garrett, publish a blog Ajax: A New Approach to Web Applications, which realize (as many others) the gap between web-base application and native-pc/desktop-application and he think that gap is closing. He gave example for Google Suggest and Google Map application.
That two Google application, that time, was new approach to web application, as he call as AJAX, Asynchronous JavaScript And XML.
"Ajax isn’t a technology. It’s really several technologies, each flourishing in its own right, coming together in powerful new ways"
So refer to Garret, AJAX consist of:
- standards-based presentation using XHTML and CSS;
- dynamic display and interaction using the Document Object Model;
- data interchange and manipulation using XML and XSLT;
- asynchronous data retrieval using XMLHttpRequest;
- and JavaScript binding everything together.
Web application, work base on http request and response.
For instance, you click one link or click submit button of web page, it is actually request data to the server, then server will response by sending bunch of HTML code.
In traditional web application, the response from the server will replace, entirely, the HTML code for one page. for example, your page contain data 1,2 and 3. You send request to the server to update data 1. if you want your page also contain data 2 and 3 for next response, you have to request data 2 and 3 as well. it is synchronous.
Using AJAX, you can request only data 1, then data 2 and 3 which already on the client (browser) no need to be requested again. Data 1 will updated on specific area of your page, the rest still untouched. it is asynchronous.
AJAX will reduce number of traffic between client and server, which on above example only data 1 will be transferred.
If you are an active user of Facebook, you will notice, receive friend request without even click any button. Asynchronous method on AJAX will check on the background to the server if there is new friend request to you.
And friend request notification only displayed on particular area of your page.
Amazingly, you can response to that friend request without refreshing entire your Facebook page.
It pretty same as native application behavior. it is bring user-friendly web application.
eureka!
Then why you still need HTML 5?
Tidak ada komentar:
Posting Komentar