• Home
  • About
  • Sample Apps
  • Adding AJAX to existing Web Apps (Part 2 of 3)

    This is part 2 of 3 blog posts discussing the article “How to Choose an RIA Path: AJAX or Adobe?” by Jeffrey Hammond. Read part 1.

    A second argument that needs some additional discussion is Jeffrey Hammond’s point that AJAX favors gradual re-factoring of existing Web apps.

    AJAX favors gradual re-factoring of existing Web apps. AJAX is based on open and standard languages like JavaScript and XML. This makes it easy for developers to integrate AJAX widgets into existing Web applications that are written in HTML, DHTML, or server-side JavaScript.

    I agree that this is a good way to improve existing HTML applications, i.e. adding some AJAX functions in a limited way to offer a better user experience, but without changing the application code substantially. In most cases the resulting application will work without JavaScript – it will only be a little less comfortable to use.

    But if you plan to cut deeper into your application – especially if you plan to change the communication patterns with the server to retrieve data – then this might have impact on your backend software layers. In the worst case, these comparatively small changes at the user interface level might lead to unforeseen and unplanned changes in the data service layer.

    Gradually introducing AJAX into your existing Web application may lead to unforeseen and expensive refactorings in lower layers

    Architecture of web applications from rich fat to rich thin

    The above diagram shows common variants of Web application architectures. The right column shows the architecture of a traditional HTML-based Web application. With JavaScript and AJAX more parts of the application are being shipped to the client (first and second stack on the left). While in the traditional Web architecture data services have always been called locally within the server tier, an AJAX application might call data services directly from the client. For performance (and sometimes security) reasons the latter case requires that data service interfaces are tailored to the presentation needs (strictly speaking: only data that is displayed should be retrieved). This often contradicts reusability of services. In many cases, services used in traditional Web applications have broad interfaces designed for reuse.

    By the way, a similar argument holds true for Flex as well, since Flex applications also call services directly from the client.

    In a nutshell: be careful when starting to re-factor existing Web applications to add RIA functionality.

    When should you use AJAX beyond polishing your application in a very limited way? Clearly, if you know that your target audience will not download an external plug-in to access your Web application, AJAX is currently your only option. To date AJAX is the only RIA technology that allows the whole internet world to use your application without extending the browser with additional plug-ins – provided JavaScript is not disabled.

    Read part 1 and part 3.

    Leave a Comment

    This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

    You must read and type the 5 chars within 0..9 and A..F, and submit the form.

      

    Oh no, I cannot read this. Please, generate a