Tuesday, May 19, 2015

Creating a simple application in ADF

It's easy to build a simple application using the HR schema that is shipped with Oracle XE
Database. The requirements for building the application are as follows:
‹ JDeveloper 11.1.2.3.0 Studio Edition: This is required to develop the ADF web
application; we have installed this on Windows as a part of Chapter 1, Installing
and Configuring JDeveloper IDE.
‹ Oracle Database Express Edition or any other Oracle DB: This is required for the
HRSchema setup for our sample application.
The high-level development processes for the employee directory application included in
this section are as follows:
1. Create the application workspace: Create a new application and set up the
workspace for developing with ADF.
2. Model database objects: Set up the HRSchema database objects for the application.
3. Create business components: Create ADF Business Components corresponding to
the DB objects.
4. Create the UI page: Use the UI components to represent the data on the page.
5. Bind the data to the UI components: Bind the exposed service to the UI
components through the data control and bindings.
1. With JDeveloper open, click on the New Application option available in the
Application Navigator panel. This will open a New Gallery window in which
you can create a new application.
2. Select the Fusion web Application (ADF) option from General | Applications
Category. This will open a Create New Fusion Web Application (ADF) wizard.
3. Type in the values for the Application Name, Directory (location for the application),
and Application Package Prefix fields. You can browse for the application location.
The package prefix is the root package that will be applied for the application.
For example, type the package name as com.empdirectory.model. The package
structure for the project is visible in the Application Navigator panel; this holds all
the project artifacts, such as Java classes or ADF metadata files.
4. In the next screen, you will have to provide the model project name and the
directory location for the project. ADF Business Components and Java are the
technology highlights of this project; these are usually defaulted to by JDeveloper.
5. The default Java settings for the Model project are configured in the next screen.
The Default Package, Java Source Path, and Output Directory options are
configured in this screen.
6. The next screen will help you to configure the UI project. This project includes
ADF Faces, ADF Page Flow, JSF, and other UI technologies as highlights.
7. Click Finish after configuring the Java settings for the UI project.

you will see that
One is the Model project that involves the ADF Business Components as the
primary technology. This creates the business service for our application.
‹ Another one is the ViewController project that involves both the view and
the controller layer.

No comments:

Post a Comment