The Oracle SRDemo Sample Application (ADF BC Version)

Introduction

SRDemo is a moderately complex, data entry application based around a self service problem and inquiry logging system for a vendor of household appliances. The application comprises 16 pages, with three different user perspectives of the application based on security privileges.

The sample uses JavaServer Faces and ADF Faces components for the user interface, ADF Business Components for the business service, and Oracle ADF Model for declarative data binding to integrate the user interface and the business service.

This sample is the basis of many of the examples used within the Oracle ADF Developer's Guide for Forms/4GL Developers and can be used as a companion to that guide while familiarizing yourself with the JDeveloper IDE and the Oracle ADF Framework.

Note: if this is your first time using Oracle ADF, we highly recommend taking advantage of the companion Oracle ADF Tutorial for Forms/4GL Developers. It takes you step-by-step through building a simplified version of this SRDemo sample application.

Key Features in the Sample

The sample covers a wide range of realistic scenarios and use cases that a developer using Oracle ADF will typically encounter. These include:

  • Maximally Declarative Development — By combining ADF's entity object, view object, and application module components, the sample illustrates a business service that exposes an active data model of SQL queries with reusable business domain logic built-in so the user interface can be built with little to no code.
  • Security—The sample is secured using J2EE container security which is used to divide the application into functional zones for different user roles as well as configure the user interface menu etc. to suit the privileges of the connected user.
  • Ajax—Using the partial page rendering capabilities of the ADF Faces component set, the sample removes unnecessary page refreshes when scrolling data-sets and trees and provides dynamic screens that can respond immediately to operations such as list of values selection.
  • ADF Bindings—The sample is based around screens which use ADF declarative data binding to integrate with the session facade. All types of bindings are used from simple method calls to complex hierarchical tree bindings.
  • Multiple Windows—The application uses the dialog framework, part of the ADF Faces component set, to create pop up windows for functions such as list of values.
  • Multiple Data Sources—The primary business service uses ADF Business Components. Additionally the sample uses the new URL data control to access a comma separated values file as a data-source for the FAQ screen.
  • Caching—The sample makes extensive use of the ADF Cache tags to cache static or per session specific portions of the page and thus improving performance.
  • Complex Controls—The sample includes examples of both Shuttle and Tree controls to illustrate the possibilities for richer user interfaces.
  • Dynamic Menus—Menus used throughout the application are defined dynamically and adapt to the security role of the connected user.
  • JUnit Testing—The sample is supplied with unit tests to verify the functionality of the data integration layer
  • ANT—Scripts are provided to install the database schema, build the sample and generate JavaDoc.
  • Multi-lingual—The sample application currently supports both English and Italian languages. The language used will depend on your browser settings.
  • ADF Faces Skinning—Rather than being based on the default ADF Faces look and feel, SRDemo uses a custom skin to provide it's own unique identity.

For more information on how to exploit these features and many more, consult the Oracle ADF Developers Guide for Forms/4GL Developers.

Prerequisites

To successfully install and run the sample you must meet the following conditions:

  • The  Oracle ADF SRDemo Application (ADF BC Version) sample application requires the Studio download of Oracle JDeveloper 10g release 3 (10.1.3).
    Note that the sample will not install under any Early Access edition of JDeveloper 10.1.3.
  • Access is required to an Oracle 9i, or 10g database instance. Any edition of Oracle 10g, including the Express Edition Beta will work. Oracle Lite is not supported at this time.

Installing the Sample

The SRDemo sample is available from the JDeveloper update center on OTN. To download and install the sample:

  1. Choose Help > Check for Updates from the menu.
  2. In Step 1 of the wizard, ensure that Search Update Centers is selected and that the option for Official Oracle Extensions is checked. Click Next.
  3. In Step 2-Available Updates, select the  Oracle ADF SRDemo Application (ADF BC Version) option. Click Next and complete the Wizard

The sample application requires that the JUnit Extension and JUnit Integration for Business Components extensions are also installed. If you do not already have these extensions installed within JDeveloper, selecting the  Oracle ADF SRDemo Application (ADF BC Version) extension will automatically select the dependent ones and you will be prompted to accept the JUnit license conditions.

You can also download the  Oracle ADF SRDemo Application (ADF BC Version) extension manually from here, and then point the check-for-update to your local file to install the sample

Once the sample extension is downloaded, you will be prompted to restart JDeveloper. When JDeveloper restarts the sample installation process will begin. The install carries out the following tasks.

  • Unpacks the sample workspace into the <JDEV_HOME>/jdev/samples/SRDemoSampleADFBC directory.
  • Creates a database schema called SRDEMO pre-populated with sample data.
  • Creates a connection called SRDemo to the above schema.

Once the installation process has completed a readme file will open in the editor area explaining how to deploy and run the sample, refresh the database data, and how to remove the sample data and files. The sample is ready to run immediately.