The New New Petstore.... with Web 2.0 features including AJAX
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.