Your First Cup: An Introduction to the Java EE Platform

Architecture of the Example Application

The example application consists of three main components: DukesAgeResource, a JAX-RS RESTful web service; DukesBirthdayBean, an enterprise bean; and firstcup, a web application created with JavaServer Faces Facelets technology.

DukesAgeResource is a JAX-RS resource that calculates the age of Duke, the Java mascot. Duke was born on May 23, 1995, when the first demo of Java technology was publicly released.

DukesBirthdayBean is a stateless session bean that calculates the difference between the user's age and Duke's age.

The firstcup web application is a JavaServer Faces Facelets application that accesses DukesAgeResource to display Duke's age, reads in a date provided by the user, accesses DukesBirthdayBean to calculate who is older, and then displays the difference in years between the user and Duke.

The firstcup web application consists of the following:

Tiers in the Example Application

The example application has one web tier component (the firstcup web client) and two business tier components (the DukesAgeResource web service and the DukesBirthdayBean enterprise bean). The user's web browser is the client tier component, as it accesses the rest of the application through the web tier. The example application does not access the EIS tier.

Java EE Technologies Used in the Example Application

The DukesAgeResource web service is a JAX-RS resource. The DukesBirthdayBean enterprise bean is a stateless session bean. The firstcup web client is a JavaServer Faces application that runs in the web container of the Java EE server.