HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

Interview With Larry Freeman, by Ajit Sagar

As readers of JDJ know, J2EE is a standard platform for developing enterprise applications using reusable components, standard APIs, and popular software design patterns. The J2EE Blueprints is a Sun initiative that's meant to aid developers trying to get their arms around the wide gamut of J2EE technologies and APIs, and the Pet Store Demo is a part of this initiative. They provide a combination of J2EE design guidelines and a sample application for building distributed applications on the Java platform. This month JDJ brings you an exclusive interview with Lawrence Freeman, the manager of the J2EE Blueprints team.

JDJ: The last year has seen some major developments in the J2EE Platform. Were there any targets Sun wanted to achieve in this time?
There are four deliverables for J2EE: the specification, the reference implementation (RI), the Compatibility Test Suite (CTS), and the reference application, that is, the J2EE Blueprints.

JDJ: What is the Pet Store Demo?
The Pet Store Demo is the reference application for J2EE that showcases the main features of the J2EE platform. It's part of the Blueprints program that seeks to provide best practice guidelines for J2EE application development. J2EE Blueprints includes a Web site, a best-selling book, design patterns, and reference applications. In the future, J2EE Blueprints will include other demo applications besides the Pet Store. The Pet Store is currently being used in the Deployathon, an event in which a J2EE application is deployed and run on multiple application servers to demonstrate J2EE portability.

JDJ: Could you briefly describe what role you've had in the design and "disbursement" of the Pet Store Demo application?
I'm the manager of the J2EE Blueprints team, and my team designed and wrote the code for the Java Pet Store. As J2EE's Application Programming Model group, we're responsible for making best-practice recommendations to application developers. The Java Pet Store was designed to illustrate these guidelines. The J2EE Blueprints team will be speaking at this year's JavaOne.

JDJ: The Pet Store demo is an unusual application. How did it emerge?
The application began as part of an effort to write a book on the J2EE application programming model. A sample application was needed to go with the book.

The original application was a wine store; however, the images that represented the different wine bottles all looked the same. Two members of our team who are pet lovers thought a pet store with its variety of animals would make a more interesting demo.

The important idea is that an online store is one of many application scenarios that can be built using the design guidelines presented by the Blueprints team.

JDJ: Could you broadly describe how the Pet Store application can be used to build and deploy real-world applications?
I think the key here is the design guidelines and patterns that are presented on the Blueprint Web site, http://java.sun.com/j2ee/blue prints. The goal is to help developers and architects make design decisions when writing a J2EE application.

Implicit in the Java Pet Store is a set of components that can be reused in other contexts. For example, the Java Pet Store includes a shopping cart, a mailer, and inventory components. It's our intention that this reference application can be used as a framework for building real-world applications. In addition, recommendations about typical design decisions need to be made, such as JSP versus servlets, stateful versus stateless session beans, and container- versus bean-managed persistence.

JDJ: The Pet Store serves as a good reference implementation. However, in the real world do you expect the application writers to implement all the pieces of the application or do you expect part of the framework to be built by third-party vendors such as application server providers?
It's our belief that these decisions are best left to the market. I think there are many fascinating frameworks out there. For example, in the recently released J2EE Tutorial (http://java.sun.com/j2ee/tutorial), there are some examples of the Struts tag library (http://jakarta.apache.org/struts) that can help developers speed up the implementation of their applications. Other tag libraries can be found at http://java.sun.com/products/jsp/taglibraries.html. It's our hope that the Pet Store and other Blueprints demo applications will aid the developer and architect in building J2EE applications that take advantage of key features.

JDJ: What is Sun's relationship with J2EE application server vendors with respect to the reference implementation?
The reference implementation is not an industrial-strength J2EE implementation. It's meant as a way for the developer community to try out J2EE and write applications on it before purchasing a professional J2EE platform. For example, there's an early access reference implementation currently available that enables developers to try out J2EE 1.3 (http://developer.java.sun.com/developer/early access/j2ee). The reference implementation is also used by J2EE application server vendors as a standard for comparing their own implementations.

JDJ: How many application server vendors have implemented the Pet Store as a reference application that's distributed as part of their product?
I assume you're referring to the J2EE Deployathon. Last year at the Deployathon an earlier version of the Pet Store was run on numerous J2EE application servers to demonstrate J2EE portability - it was tested on eight different platforms. Detailed information about last year's Deployathon can be found at http://developer.java.sun.com/developer/technicalArticles/J2EE/deployathon2.

In this year's Deployathon we expect to have a larger number of participants using Java Pet Store 1.1.2. We'll have full details at JavaOne.

At present, I'm not sure about the exact number of application server vendors who are distributing the Pet Store as part of their product, however, it's available for download at our Web site. For the latest information on J2EE- compatible application servers, check out http://java.sun.com/j2ee/com patibility.html.

JDJ: What exactly is the Deployathon and how is it used?
The Deployathon is an exercise run by Sun to demonstrate J2EE's "write once, run anywhere" message. It takes the Blueprints reference application and deploys and runs it on different J2EE app servers. Last year's Deployathon is available online at http://developer.java.sun.com/developer/technicalArticles/J2EE/deploy athon2.

JDJ: Does Sun provide standard guidelines for vendors to implement the Pet Store?
I'm not sure what you mean by "implement." Java Pet Store is designed to be deployable and runnable on all J2EE-compatible servers. We provide both the source code and the binary form of the Java Pet Store on our Web site. Any developer on any J2EE-compatible application server can run the reference application on their platform.

JDJ: What types of problems have vendors faced getting their application server products to comply with the J2EE Blueprints that are used to implement the reference application?
J2EE Blueprints is a set of design guidelines used by application developers. It's routine that after an application server has passed the CTS, the next step is to verify that the Java Pet Store can run on the platform. This is a de facto test; the CTS is the official test. However, none of this is required by the J2EE Blueprints.

JDJ: Have you received any feedback from the vendors?
We've received a large amount from vendors and developers. As the J2EE best practice group, we're constantly thinking and rethinking the best way to implement the different J2EE technologies in applications. For example, we've updated our book with more recent design recommendations based on this feedback, which can be found at http://java.sun.com/j2ee/blue prints/qanda.html.

JDJ: How useful do you think such a reference application is for the Java community? Does it benefit only the J2EE platform developers or can it be used by all factions of the Java community?
My team is focused on the J2EE so their recommendations focus on it too.

JDJ: Does the Pet Store Demo contribute to any type of certification or measuring stick for Sun to evaluate application server vendors?
It's not a measuring stick for Sun. I'd say it's more of a tool used by the application server vendors themselves. As mentioned earlier, it's a useful test after a vendor has passed the CTS. It's a standard way for them to try their J2EE platform out. Sun's official test is the CTS.

JDJ: Of the vendors who have leveraged the Pet Store to provide tutorials for their products, which implementations do you think offer the best examples?
This is not the intention of the Pet Store. The goal of the Blueprints program is to help developers take advantage of the key features of J2EE. Our target audience is developers.

JDJ: Are there any other reference applications in the offing? Do you think the Pet Store covers it all?
There are other reference applications currently being planned. I'm very excited about what's coming up. I'd encourage developers to continually check http://java.sun.com and http://java.sun.com/j2ee to find out the latest. In addition, developers can sign up for our mailing list at http://archives.java.sun.com/archives/j2ee-interest for the latest information.

No, I don't think the Pet Store covers it all. That's not its goal. Its goal is to cover all the major features of the latest release of J2EE. When J2EE 1.3 is released, a reference application will also be released that showcases its major features.

JDJ: How can our readers familiarize themselves with the Pet Store? What if they don't have access to an industry-strength application server?
I'm glad you asked this question. The J2EE reference implementation is an excellent way to try out J2EE. Best of all, it's free. It's one of the many platforms that make up the Deployathon.

Another way to become more familiar with the Java Pet Store is to take advantage of the Blueprints book available at http://java.sun.com/j2ee/blueprints/apmtoc.html.

JDJ: What other resources are available for learning J2EE application development?
At present J2EE is putting together a Developer's Corner that should be available before JavaOne; check for this at http://java.sun.com/j2ee. As I mentioned before, there's a new J2EE tutorial available at http://java.sun.com/j2ee/tutorial. Another useful resource is the document bundle that comes with the reference implementation. Included in this bundle is the J2EE Developer's Guide, which helps developers take advantage of the Deploytool, a GUI-based tool that comes with the reference implementation. The Java Developer Connection has resources for learning more about J2EE, for example, http://developer.java.sun.com/developers/technicalArticles/J2EE. For developers looking for an IDE, there's an early-access release of the J2EE IDE Toolkit at http://developer.java.sun.com/developer/earlyAccess/j2eeide-toolkit.

JDJ: Are there other "Blueprints" under development for the Java platform? Does Sun plan to provide other implementations of them?
Yes, there are other other implementations. Hopefully, we'll be able to make some announcements at JavaOne. In the meantime, keep checking our Web site at http://java.sun.com/j2ee/blueprints.

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.