Unofficial Content
  • This documentation is valid for:

Internet has come of age as an enterprise technology that enables accessing and sharing business critical information and applications with a degree of freedom unknown before. However, Internet applications lack the richness and responsiveness of desktop applications. Ajax is a software architecture designed to bridge this gap.

Definition

Ajax is an architecture and not a technology. Ajax stands for Asynchronous JavaScript XML.
It incorporates:

  • 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.

Ajax transforms the Web user experience from a discontinuous experience, where users have to wait for the server to respond after each page submission, into a continuous seamless experience, where users interact with a responsive interface, regardless of the trips to the server which are now invisible to them.

The classic web application model works like this:
Most user actions in the interface trigger an HTTP request back to a web server. The server does some processing - retrieving data, crunching numbers, talking to various legacy systems - and then returns an HTML page to the client.
In this model, while the server is processing, the user is just waiting for its response. This is not a great user experience.

The Ajax approach is very different: an Ajax application eliminates the start-stop-start-stop nature of interaction on the Web by introducing an intermediary - an Ajax engine - between the user and the server.

Instead of loading a webpage, at the start of the session, the browser loads an Ajax engine - written in JavaScript and usually tucked away in a hidden frame. This engine is responsible for both rendering the interface the user sees and communicating with the server on the user's behalf. The Ajax engine allows the user's interaction with the application to happen asynchronously - independent of communication with the server. So the user is never staring at a blank browser window and an hourglass icon, waiting around for the server to do something.

In the next figure you can see the traditional model for web applications (left) compared to the Ajax model (right):
 

 

 

Every user action that normally would generate an HTTP request takes the form of a JavaScript call to the Ajax engine instead. Any response to a user action that doesn't require a trip back to the server - such as simple data validation, editing data in memory, and even some navigation - the engine handles on its own. If the engine needs something from the server in order to respond - if it's submitting data for processing, loading additional interface code, or retrieving new data - the engine makes those requests asynchronously, usually using XML, without stalling a user's interaction with the application.
 

 

 

GeneXus and Ajax

GeneXus 9.0 includes a lot of features based on Ajax:

Web client-side validation: It triggers formulas and gets inferred attributes after validating Foreign keys; user experience like a win application! Just generate again your KB and enjoy! More Information...

Suggest (intellitips): Setting a property you allow the user this: he writes just some characters and the application gives him automatically the rest and/or suggests him the possible values! More Information...

Input type "Values" or "Descriptions" Avoid prompting for the possible values of the Foreign Keys! In the Invoice: enter the Customer Name instead of the Customer Id! Combine this feature with Suggest and you get incredible user experience. More Information...

Dynamic combo boxes with filters: You can set loading conditions of a dynamic combo box. For example, the application filters in run time the Cities, showing just the ones from the selected Country. When you change the Country, the Cities are reloaded appropriately. More Information...
 

FAQ

Q. Is Ajax a technology platform or is it an architectural style?
A. It's both. Ajax is a set of technologies being used together in a particular way.
 

Interesting Links

Official 'GeneXus and Ajax' site

Sample to see Ajax features running online

Sample KB to download

More information about Ajax



Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant