With the increase in the number of sites on the online world, the time in page loading has gain a huge concern from the online community. It is the core reason of using the Ajax-style programming of loading HTML/HTTP-mediated page time. The Ajax provides a base for the complex, dynamic, intuitive and data centric interfaces of web pages. The whole web 2.0 era is relied on the capabilities of Ajax programming language. But why is it so?
Let’s take a look at the web pages. Web pages unlike native applications, are very loosely coupled i.e. data to be displayed is not tightly bound to the data sources. Hence must be marshaled (put in an order) into the format of the web page before it is sent to the user agent of the interface. It means every time data gets changed, though in a small part of the page, the whole page has to be reloaded.
Characteristics of AJAX programming
Reduction in bandwidth usage
Ajax has come up with various characteristics which make it fairly preference choice in our applications especially if the applications are data-savvy. Ajax generates the HTML page locally. It reduces the java script calls by lowering down the actual data to be display. It let the layout to stay as it is and only modifies that part which is meant to be and leave those parts which are not meant to be updated. This happens so because of one of the offerings of Ajax: XMLHttpRequest object. This object supports all kinds of HTTP request and requests to non-Ajax pages. This returns and requests the data without the re-load. Hence it gets skipped by the developers and makes the application to behave like other tightly coupled applications. This way Ajax cuts down on bandwidth usage.
Ajax makes the application more interactive which is in huge demand with social networking sites. It reduces the waiting/response time. The servers-side and client-side based Ajax frameworks reduce the traffic to and from the server.
Distinction from data, format, functionality and style
Another characteristic which is also an advantage of Ajax would be that it allows developers to distinguish the formats and methods which are used for different parts of the information delivery on the web. While Ajax may seem to be a combination of languages and techniques in real sense, programmers and developers have the freedom to adapt and adopt whatever works for them. They are normally driven by the motive of development itself, to adopt a separation among the following:
a) The content which is to be delivered i.e. the raw data is embedded in XML and sometimes retrieved from a server-side database
b) The structure or the format of the web page is built on HTML or XHTML almost always, and then in the DOM it is made available for dynamic manipulation.
c) The embedded or referenced CSS makes possible each and every style element on the webpage from Picture placement, to fonts, to any other elements that would form a design.
d) Webpage’s functionality is provided by the combination of:
ii) Server-side scripting and/or programs by using any programming language on which the programmer is comfortable to accept the client’s specific request and respond to that appropriately.
Ajax in long run
Ajax comes in many flavors such as we have .Net based Ajax framework, php based Ajax framework and so on. But when it comes to scalability of Ajax it is still an issue. Reason being Ajax finds it difficult to integrate with the browsers. The Ajax-based pages do not get registered themselves with the browsing history so a “Back” button will not function properly. This hinders in scalability as the basic facility of “back” function has been omitted.
this is the major lacking as in today’s world of social networking, if SEO is not performed then use of Ajax make get less and developers will start opting for other frameworks.