AJAX front-end for the Java Pet Store


News: AJAX front-end for the Java Pet Store

  1. AJAX front-end for the Java Pet Store (7 messages)

    AJAX applications are quite often brand new applications, without any legacy to consider. Nevertheless, most IT project in the world are upgrades to existing systems. An article on BEA Dev2Dev shows how you can add an AJAX front-end to Sun's Java Pet Store application, without modifying the Pet Store application itself. The AJAX front-end connects to the Pet Store via Web Services, native Java calls, and direct database calls.

    A quote from the article:
    When enriching the front end of the pet store—or any other typical Web application—we will continue to rely on the following two cornerstones of the architecture:

    • The end user still uses a standard Web browser without any plug-in to access the pet store.
    • The entire back end, consisting of J2EE business logic and data, will be unchanged.

    The fact that the existing back end is fully isolated during development and will not be changed is especially good news for architects and IT managers. Through a clean, modular architecture, they will be able to control risk and cost while dramatically improving user friendliness of the Web application.

    The solution uses both a client-side AJAX engine, and an XML Pipeline server. The XML pipelines create the link between GUI functionality and Web Services, Java objects, databases or files. It seems to be an elegant solution that integrates well with a SOA architecture. Will this make it easier for AJAX to move into the mainstream corporate IT environment? Or will AJAX be stuck in the domain of consumer applications?

    Threaded Messages (7)

  2. I do not wish to hear again from Jeff Dill from Isomorphic (spelled right) that these are not

    competing products.

    Do not (at least, I will not) forget to look at the following commercial products also:

    1. SmartClient from Isomorphic (spelled correctly) Software
    2. Rich Client System and WebORB from themidnightcoders.com
    3. Backbase

    If AJAX works on TSS (here), it will be able to bring in the related images from each of the above

    sites and display them on the fly without refreshing this whole thread for comparisons. That will be

    one of the uses of AJAX. Send a proposal to the TSS team!

    Anyway, those comparisons will help us as AJAX developers, product buyers.

    Also, the above products are progressing forward in such a way they can soon compete directly with

    the portal products. Spending $200mn in cash, for example, to buy PlumTree -- will it make sense when

    the above products mature?

    So many thoughts in my post here.

    Good article, BTW. Thank you for mentioning the reference here.
  3. Browser Refresh[ Go to top ]

    I had a little play with the demo. It all seems to work pretty well (and slick), although hitting the browser refresh button causes the whole application to reload and the current session to be lost.

    Does anyone know how this can be solved using AJAX?
  4. Browser Refresh[ Go to top ]

    I've had a little rummage around, and yes you can (sort of) in IE and Firefox. Try the following HTML page

    This page demos ONBEFOREUNLOAD. A dialog displaying the message:
    'Are you sure you want to navigate away from this page?'
    appears if you navigate away from the page, or refresh, or click back.

    This is an original IE feature that is now in Firefox. I don't know about others.
    function unloading(event){
        // In IE this message appears in exiting dialog.
        event.returnValue = 'If you do, you will lose your data';
        // Firefox - put up an alert box instead.
        if(navigator.userAgent.indexOf('Gecko') != -1){
            alert('You are about to leave this page. '+event.returnValue);
        return true; // FF currently must return something.
    <body onbeforeunload="return unloading(event)">
    Application Loaded:<BR><script>document.write(new Date());</script>
  5. Ajax Performance[ Go to top ]

    I had made a little test by AJAX, and I think that it can offer a powerful Client Side, but I have some reservses about the performance since the XML file size become voluminous, specially for the bigest web sites that contain a lot of datas to view. Have you made some tests in this case!!
  6. Hello All,
    I have been working with AJAX for some time. I can appreciate its use for RIA but before I consider it for real Enterprise class application (much bigger than Pet Store), I would like to have expert comments related to AJAX performance in general. <br><br>

    1. Through AJAX, though the requests and responses are asynchronous and carry small bunch of data, CPU utilization and Network consumption are low. But say in an application like Google-Suggest when many users are trying to search something which asynchronously hits server for each character typed. On server side this concatenated string is used for database fetch operation. For 100 users there will be too many requests (an each per character). Should we consider this as performance hit? Is there any criteria for selecting hardware for AJAX based applications?
    2. Are there any standard guidelines on Server side architecture design for AJAX based applications? There are blueprints present on Java site talking more on AJAX + JSF together, but I did not find detailed server side application partitioning guidelines. Is there anything available?

    Thanks in advance
  7. AJAX Performance/Server load test[ Go to top ]


    "But AJAX based web applications have very different traffic profiles to traditional webapps. While a user is filling out a form, AJAX requests to the server will be asking for for entry validation and completion support. While a user is reading content, AJAX requests may be issued to asynchronously obtain new or updated content. Thus an AJAX application needs a connection to the server almost continuously and it is no longer the case that the number of simultaneous users can greatly exceed the number of simultaneous TCP/IP connections."

    According to this, AJAX should have a very big negative impact on the server performance/scalability. This should translate into very expensive hardware to support the same number of concurrent users the non-AJAX application would. Are our customers ready to pay the price for the RIA?
  8. Talking about AJAX and XML Pipelines[ Go to top ]

    I think it would be a big mistake to mention XML Pipelines and AJAX without mentioning Orbeon's OPS. Orbeon's OPS is a very elegant presentation platform that put XML pipelines and XML processing at its heart. Orbeon's OPS is open source (LGPL). Check it out at www.orbeon.com. See all the examples at: http://www.orbeon.com/ops/