The Source for Java Technology Collaboration
User: Password:



Inderjeet Singh

Inderjeet Singh's Blog

The New New Petstore.... with Web 2.0 features including AJAX

Posted by inder on May 12, 2006 at 11:51 AM | Comments (8)

This ain't your father's petstore! The Java BluePrints team has created a new version of the popular Java Pet Store reference application to illusrate how the Java EE 5 platform can be used to create AJAX-enabled Web 2.0 applications.

The first striking feature of the application is the use of AJAX to create a highly interactive GUI experience. The GUI does minimal page refreshes by updating various GUI elements asynchronously using AJAX. The catalog is presented not as a boring list of items, but through an interactive slider which previews various listed items, and provides collapsable sections for more details. It also allows searches of the pets by location, a much more natural way of finding pets around your neighborhood than using a keywords based search.

Even though this application is called Java Pet Store, and uses the immortal petstore graphic, dont be fooled by the looks. Inside, it is a completely different application showing different use-cases targeting Web 2.0. The earlier petstore was a standard ECommerce website where the enterprise owning the site generated all the content. In the Web 2.0 petstore, all the content is uploaded by the user community itself. Whenever a site allows users to submit content, it needs a way to prevent automated systems to add graffiti to the site. The Web 2.0 petstore uses a captcha JSF component to discourage graffiti. The content is not just community-generated, but community rated as well. The petstore uses an AJAX-enabled JSF component to show aggregated ratings on an item, as well as allows users to submit their own rating.

The Web 2.0 petstore also demonstrates how to create mashups with other Web services. For location-based searches, it uses a mashup with Yahoo Geocoder to obtain longtitude and lattitude for an address, and then uses Google maps service to display the pets on the map. For payments, it uses a JSF component that uses PayPal service to send payments to a seller's email address. The petstore also demonstrates how an RSS feed can be integrated by displaying recent news announcements from blueprints in the banner of its Web pages.

So, here it is, the new new petstore. Download it now, and run it on the Java EE 5 SDK. See this page to learn about the various JSF components used in the petstore and how to use them in your applications for free. Finally, share your thoughts on this new petstore. We are keenly listening.


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

  • I will not download the demo and the SDK. You should post a demo. I guess 100 times as many people will see it, than will bother to download and try to setup the demo.

    Posted by: keithkml on May 12, 2006 at 01:27 PM

  • Re-reading, I see I was not clear. I mean you should post a live demo that I can simply browse to.

    Posted by: keithkml on May 12, 2006 at 01:32 PM

  • Hi keithkml, thanks for your comment, we will try to get an online hosted version but it will take some time. Meanwhile, you can see the following short video for a glimpse of what this demo is about.

    Posted by: inder on May 12, 2006 at 01:33 PM

  • Very interesting -- can't wait to look at the new app.

    One comment: bundling the Java EE SDK with a JDK makes it more difficult for MacOS users to get things up and running. Judging from the last JavaOne, there are quite a few of us developing on the MacOS.

    Posted by: bitpuddle on May 15, 2006 at 08:16 AM

  • Hi bitpuddle, For MacOS version, the JDK is not bundled in the SDK. BTW, the SDK is not directly available for MacOS X. It is available either through the Java EE 5 Tools Bundle Beta or through Project GlassFish build 48. Both of these bundles do not contain the JDK.

    Posted by: inder on May 15, 2006 at 10:39 AM

  • Hello Inderjit,
    I am getting json.channel.link is null (javascript) error in petstore web 2.0 application. Please let me know the solution.

    Posted by: atulkjava on January 04, 2007 at 09:27 AM

  • Hi Atulkjava, we will be happy to investigate this further. I noticed a similar post on this in the Java BluePrints forum, and we will answer it there.

    Posted by: inder on January 04, 2007 at 11:22 AM

  • Hi Inderjit-ji, It's me only who had put post on java blueprints forum. I could get rid of that json.channel.link is null (javascript) error. But I have put few observations there.

    Posted by: atulkjava on January 05, 2007 at 04:04 AM





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