The Source for Java Technology Collaboration
User: Password:



Greg Murray

Greg Murray's Blog

Rich Web Applications with AJAX

Posted by gmurray71 on April 25, 2005 at 02:44 PM | Comments (4)

There has been much talk about rich web applications in recent days. When I first encountered Asynchronous JavaScript and XML (AJAX) it was still being called web remoting or remote scripting. After seeing some pretty cool applications being developed by some well known companies I took myself to task and wrote a few rich web applications using AJAX with J2EE technologies supporting the server-side logic. I found that AJAX can really make a better web applications that can do some amazing things such as simulated server-side pushes using polling, in-page form validation using server-side validation logic, and auto-completion all without page refreshes. The document Asynchronous JavaScript and XML (AJAX) with Java 2 Enterprise Edition details the AJAX interaction model in much more detail and elaborates on some of the usecases for AJAX.

Using AJAX does not come for free though. You must accept and embrace JavaScript and CSS, assume that it is available and enabled on the client, and invest time making sure the applications behave the same across browsers. This sounds simple enough but from my experience I spend much more time developing the JavaScript and CSS than I do the server-side logic. In time this will become easier as frameworks embrace/emerge that will support AJAX.

Where are we at today?

Currently, I am responsible for the servlet specification and I am a former member of the BluePrints team. The BluePrints team and I are using the Java BluePrints Solutions Catalog to showcase AJAX with J2EE technologies. There are currently four solutions for using AJAX with J2EE in the Java BluePrints Solutions Catalog. Each solution includes a problem/solution statement, a design document, and working code.

Please download the Java BluePrints Solutions Catalog (a set of web applications including the documentation) or view the documentation online at https://bpcatalog.dev.java.net/nonav/ajax/index.html. We plan to actively increase the number of solutions in the catalog so please stay tuned.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Hi greg,

    I got quite excited when I saw this as I'd be very interested in making use of this kind of technology with j2ee in particular.

    Are there any LIVE examples of this in action?

    Many thanks,
    Gerry
    ( gerry.steele at gmail dot com )

    Posted by: geryman on April 27, 2005 at 07:07 AM

  • Yes, there is a lot of buzz about AJAX lately and I still think that it's not worth the risk of depending too heavily on JavaScript. JavaScript continues to be vulnerable to malicious code so I would not use it for anything too important, IMHO.

    Posted by: jbob on April 27, 2005 at 08:03 AM

  • Nice. Thanks for the link.

    Posted by: d_bleyl on April 27, 2005 at 08:34 AM


  • JavaScript does contain some vulnerabilities, but the programming model for JavaScript and AJAX requires that you can only interact with the server from which the original page was loaded and you do not have unauthorized access to the local file system. I originally had the same fears but I really do think JavaScript has passed the "tipping point" and it is time for it to be a first class citizen in the web application programming model. That said you should still always do server-side validation of data regardless of whether the interaction was AJAX or not. Living in the HTTP world you can never put too much trust in what comes from a client.


    We are working to get the samples up and live in the next few weeks. Getting the examples running should be a snap. Although the Java Solutions Catalog distribution setup is optimized for the Sun Application Server 1.4, the AJAX solutions are simple WAR files that run on all the major web containers. Give them a try and let us know what you think.
    </P

    Posted by: gmurray71 on April 27, 2005 at 10:08 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds