Bean Extender: Guide to Demos


The Travel Services Demo Overview

The Travel Services demo includes the following phases:

Setting Up Overview

Before running the demo, you must perform certain tasks to set up your computer. Tasks performed during the setting up phase include:

Aggregation Overview

The demo begins with an aggregation phase. This phase demonstrates three beans being connected together to form an aggregate bean. These beans are:

Itinerary bean

An input bean that allows the user to specify the city of origin, the destination city, and the date of departure. When the user specifies the date a calendar bean is displayed. The calendar bean is an off-the-shelf bean.

FlightSelector bean

A complex composite bean, containing some simple beans, an off-the-shelf FlightInformationViewer bean, and some wiring and scripting to make the assembly work.

FlightInfoDap (Data Access Part) bean or the FlightInfoDapClient and FlightInfoDapServer bean pair

The FlightInfoDap bean is a Data Access Part bean single machine solution that simulates a connection to a database containing flight information. The FlightInfoDapClient and FlightInfoDapServer bean pair allows for the possiblity of a multi-tier demo with the second tier having the option of accessing a database using a JDBC solution.

Scripting Overview

Please note that all references to the FlightInfoDap bean below will mean the FlightInfoDapClient bean if the remote travel demo is being built.

The scripting phase adds code to show the FlightSelector bean when the FlightInfoDap bean generates a FlightInfoChanged event.

The resulting travel services bean is a functionally rich application. The Itinerary bean generates a TravelInfoChanged event when the user specifies a city of origin, a destination city, and the departure date. The TravelInfoDap bean listens for that event and generates a FlightInformationChanged event containing flight information for all possible flights that match the user criteria. Inside the FlightSelector bean the FlightInfoViewer bean listens for the FlightInformationChanged event, and updates its display accordingly. As the user specifies a different flight, detailed information about that flight is displayed in the detail image and detail text beans. A FlightRequested event is published out of the FlightSelector bean. Real, complex beans have inner beans which have events methods and properties that must be surfaced, if the bean is to be useful. This is accomplished with the publish technology.

When the user completes the interaction with the FlightSelector bean, clicking on the Ok button hides the FlightSelector bean. The Itinerary bean updates that leg of the trip with the information selected. The user can then proceed to plan the next leg of the trip by clicking on the Add Flight button or reserve tickets for the legs already planned by clicking on the Ticket button. The other buttons at the bottom of the itinerary window give an idea how this bean can be extended to provide a full function travel services bean.

Dipping Overview

Having demonstrated how the application works, the demo proceeds to show how the application can be enhanced with the Bean Extender morphing and dipping technologies. During this phase, the FlightInfoDap bean (or the FlightInfoDapServer bean if a remote travel demo is being used) is first morphed to be a subclass of the original bean which also implements the Dippable interface, then dipped into a FlightRules bean that contains two business rules that can be applied to the aggregate morphed bean. Now when the aggregate bean runs:

Cleanup Overview

During this phase, the demo computer is returned to its original state by restoring key files. After the cleanup phase, the computer is ready to perform the Travel Services demo again or to perform another demo.


[ Top of Page | Previous Page | Next Page | Table of Contents | Documentation Homepage ]