Anda di halaman 1dari 26

11i & R12 Extending Oracle Applications: OA Framework

Agenda 1. Overview of OAF

I. II.


What is MVC Pattern What is OA Framework Significance


All about OAF



OAF Architecture MVC Implementation in OAF Implementations OAF Process Flow OAF Features OAF Development with JDev IDE

MVC Design Pattern

The controller responds to user actions and directs application flow Controller



The model encapsulates underlying data and business logic of the application

The view formats and presents data from a model to the user

What is OA Framework

OA Framework Design Patterns (MVC) Core Java Specification


Oracle APPs out-of-box I-Modules are Self Service Web Modules OA Framework facilitates

Customization and extension of these out-ofbox I-Modules Development of fresh new Self Service Web application module

OA Framework Architecture

Application Server

Data Server

Servlet Engine

BC4J UIX OA Extension (MDS) OA Controller

Metadata Repository

11i Data

Parts of OA Framework

UIX - Java components for representing UI BC4J - Java business components for representing business logic OA Extension Declarative data for UIX Extension to JDeveloper

Resides in Metadata Repository (MDS) or XML files

Parts of OA Framework

AOL/J - Applications authentication, authorization and java services OA Framework - Programmatic glue which integrates these technologies

Object Oriented Reuse

Core Layer represents the database Surface Layer represents the application pages Attribute validation is implemented at the Entity Object level Reusable components saved as shared regions in MDS repository and reused across several pages

Anatomy of an OA Framework Page

Page Basics

At Browser level, an OA Framework page like any other web page rendered as standard HTML In the middle tier, page is actually implemented in memory as a hierarchy of Java Beans For a Page Request at Browser, OA Framework reads the pages declarative metadata definition to create the Web Bean hierarchy


Model implemented using Oracle Business Components for Java (BC4J) View implemented using UIX XML (UIX) and uses Meta Data Services (MDS) as repository for loading UI Controller is a pure Java class implementation


Application Module

A container that manages and provides access to related BC4J model objects BC4J Entity Objects encapsulate business rules (validations, actions etc.,) associated with a row in a database table BC4J View objects encapsulate a database query After a query is executed, a View Object provides iteration over and access to its result set Encapsulates JDBC Connection associated with the Application Module Used in performing actions like creating a Callable Statement, accessing session-level Application Context information, and to perform operations like converting server date/time into user date/time etc.,

Entity Objects

View Objects



It formats and presents the Model to the user Pages are comprised of regions and items Regions are container objects that can hold items and other regions Items are simple widgets like buttons, fields, images etc. Attribute Sets Data Source Binding


Responds to the user actions and directs application flow Request Handling Handling Get request

Web Bean instantiates its controller and calls processRequest() Web Bean instantiates its controller and calls processFormData() to write the Form data to the Model

Handling Post request

Controller: Controlling UI Behavior

Every OAF page should contain minimum one controller. Controller classes define how your Java Beans behave. You can override controller classes to:

Manipulate the UI at runtime Manually initialize data items Intercept and handle user events like button clicks

View: OA Framework-Based Page

View: Java Objects in a Page

Each UI widget corresponds to one or more Java objects (beans) The Java objects are used to create HTML at runtime Customers and third parties use the Personalization Framework to modify pages to fit business needs and user preferences.

View: A Framework Example

Header Bean

Submit button Bean

Results table Bean

View: A Framework Region

A region is a reusable container that holds items A region can contain items like

Buttons ,Fields, Images and Other regions

Regions can inherit properties from other regions Every region can have separate controller file

OAF Process Flow

UI View File
User presses Go button

processFormRequest() calls SerachEmpDetails()

Application Module (Model)

SerachEmpDetails() Finds and instantiates the view object Calls the view object initQuery()

View Object (Model)

initQuery() Initializes the query executes the query

Entity Object (Model) Data Base

OAF Process Flow

Reading Data from Database

OAF Features

In-built integration mechanism with Oracle Apps. All the Features of Forms available


Framework facilitates most of the implementation code. Fast customization with less code.

OAF Development with JDev IDE

For Developing OA Framework Application we need to use JDeveloper 9.0.3 only

Basic JDeveloper Configuration

You need three directories: JDEVBIN (usually, D:\jdev\jdevbin) JDEVHOME (usually, D:\jdev\jdevhome) JDEVDOC (usually, D:\jdev\jdevdoc)

Configure the JDEV_USER_HOME Environment Variable on Your PC

Create a new environment variable in the system settings of your PC. Call it JDEV_USER_HOME Set it to <JDEVHOME>\jdev The jdev part is required. JDeveloper places its system subdirectory under jdev when you initially start up JDeveloper. Example: D:\jdev\jdevhome\jdev

Directory Structure on your machine