AJAX Implementation Strategies

This is the second installment of my AJAX overview. If you missed the first part, you can read it here. In this post I’d like to show two different approaches that AJAX frameworks usually take.

Server-side frameworks with AJAX integration
Some AJAX frameworks combine dynamic page generation with AJAX components. This allows seamless integration of AJAX features with the advantages of the respective server-side technology. Much of the content is still dynamically created on the server like in a traditional UI but additional JavaScript code is added by the framework enabling AJAX-based features. Typically, the nitty-gritty details of the JavaScript code are completely hidden away from the developer. While this makes the transition for developers easy, the UI will be limited to controls and behaviors the framework offers. One example for such an approach is Microsoft’s ASP.NET AJAX framework. It allows ASP.NET pages to be easily AJAX-enabled by adding new controls to the page using techniques the developer is already familiar with.

JavaScript UIs
At QAT, we generally takeĀ a different approach. Our AJAX UIs are written using JavaScript, CSS and HTML (a combination also referred to as DHTML) only. The UI will communicate with server-side components to retrieve data and updates, usually via web services. This allows for greater flexibility:

  • The developer has maximum control over what the UI can do and can customize almost every aspect of the UI.
  • It is easy to add third-party JavaScript controls like trees, grids etc.
  • The UI can integrate with virtually any server technology and handle data in many formats – XML, SOAP and JSON – JavaScript Object Notation, just to name a few.
  • The UI can retrieve and mix data from multiple applications and sources (for example hand-coded applications and applications created with CA Gen – some security restrictions apply).

The DHTML-only approach requires a deeper understanding of the involved technologies and often extensive JavaScript coding. Due to its great flexibility, JavaScript code is often harder to debug and maintain than server-side code. Of course, there are excellent JavaScript frameworks available that make this task easier and abstract away most of the browser-specific issues a JavaScript developerĀ has to deal with, but this approach is usually better suited for developing small sets of pages that require complex behavior that is not easily attainable with a server-side framework (for example, true spreadsheet-like behavior) or pages that need careful handling of background tasks in order to perform well.

Of course, both approaches can be mixed either within a page or within an application. In fact, our own QAT WebDaptive Framework can facilitate just that: seamless mixing of traditionally developed web applications and CA Gen Web Applications with DHTML/AJAX pages custom-coded using JavaScript libraries of your choice (QAT WebDaptive provides its own communication client and a few controls but can be easily complemented with third-party libraries).

- Anke


AJAX, QAT WebDaptive

Written by: |

Connect with us: