0% found this document useful (0 votes)
162 views18 pages

OAF Session Basics1

OAF is a Java-based framework for building web pages within Oracle E-Business Suite. OAF follows MVC architecture with the model handling data, the view displaying information, and the controller managing input and updating the model/view. Key components include entity objects, view objects, application modules, and controllers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views18 pages

OAF Session Basics1

OAF is a Java-based framework for building web pages within Oracle E-Business Suite. OAF follows MVC architecture with the model handling data, the view displaying information, and the controller managing input and updating the model/view. Key components include entity objects, view objects, application modules, and controllers.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

INTRODUCTION TO OAF

DIFFERENCES IN FORMS AND OAF

FORMS OAF
Forms Follows only Client Server OAF Follows MVC and Client Server
Architecture Architecture
These are not light weight components These pages are light weight components

Cannot be sent through mobile devices OAF Pages can be sent through mobile devices
OAF pages are integrated with the Java Top
Forms are integrated with Application Top
Commit command always occurs in the
The COMMIT_FORM or
Application Modules (AM) Java code. By this
DO_KEY(COMMIT_FORM) commands command, the data is transferred from OAF
can be invoked by any trigger that allows Cache to database.
restricted procedures.
A page is divided into regions. Regions contain
A form is divided into blocks; blocks contain fields, buttons, tables, and other components.
the fields, buttons, and other components.
Comparison between PL/SQL & JAVA

PL/SQL JAVA
The packaging structure is called
Code is written Inside package
class
Whenever we have to call a third
This import is not applicable in party application , we use import
PL/SQL
command
We need a package called directory
we need a schema here
structure
We have methods similar to function
Here we have procedures/functions
PL/SQL JAVA
Files are saved as sql/pks/pls/plb Files are saved as .java

Variables are used Objects are used

After compilation the code will be After compilation it would be as


converted as pcode .class
Tools used will be Tools used will be Netbeans(IDE) ,
SQLDeveloper/TOAD/SQLplus Eclipse(IDE),Jdeveloper(IDE)
OAF

OAF is a java based application framework to develop web based applications that link to
Oracle Applications instance while maintaining all the security features of that apps instance.
A framework is a specialized set of related classes designed to make application development
easier. In effect , a framework implements part of an application so developers dont have to
write all of its code from scratch; they can use the framework as the basis for their work and
while focusing on the additional code required to implement their specific application
requirements.

Why OAF ??
As more and more applications are being developed, new technologies arealso evolving at
the same time.
If we look at our web application from scratch, even state is not maintained for our pages. For
example, I want to create a search form. When I click on search/submit button, the criteria
fields will not retain their values automatically. Also we useJavaScriptfor validations and lots
of other things for similar basic functionalities.

Now, the solution to these problems is that lots of frameworks are there in which such
common functionalities are pre-written
The motive behind creating frameworks is that the attention of developers should only be
towards developing the application i.e. the business rule because these things are not
Difference between API & Framework:

API is a library. At times we instantiate objects of library code and call their
functions.
Framework hassome blocks of code written and we have to fit our own
code somewhere inside those blocks.
So to fit our code what we do is that sometimes we make our classes to
inherit from other classes, implement the methods what framework
specifies.This is what happens in most of the frameworks.
For example we want to make our application on MVC (Model - View -
Controller) architecture. So for that we can use Struts (a framework which
provides built in support for MVC). However thisdoesn'tprovide much support for
UI(User Interface).
JSF(Java Server Faces) is also a framework which provide us a complete model of
visual components, provides event handling tech for web-apps and lots of other
services.
Oracle Application Framework :
OAF - Framework developed by Oracle for building and sample web page of Oracle
launching web pages within Oracle E-Business Suite (EBS). EBS:

All pages within EBS are almost similar in look and feel. Based
on this, below are some common functionalities which
are already provided by this framework so that we can mainly
concentrate on implementing business logic:

Built in support for MVC architecture .


Inbuilt support for Apps specific features like flex fields, menus
etc..
Provide classes for all standard components seen on pages
like text fields, buttons, tables etc..
Support for connection pooling and session management.

Personalization - We can change look and feel, layout or


visibility of contents on the standard pages delivered by Oracle.
However the main thing here is that OAF allows somewhat
skilled functional user to apply these changes.

Almost every implementation of EBS has to make some changes to some of these pages.
Since OAF is used only for creating EBS pages, copyright links and global links are provided by
this framework by default.
OA Framework is J2EE based but it also supports various standards like HTML, XML, SQL, and JSP.

Importance of OAF in Oracle Apps:

These pages are designed in the user understandable format.


Its easy to deploy within a web browser.
It gives better performance over Internet and has faster transaction rate.
It requires no support or training for users and is more user friendly.
Mainly it provides security, integration, and customization
MVC ARCHITECTURE

As J2EE follows MVC architecture, OAF


also follows MVC architecture
The abbreviation of MVC is Model View
Controller.
MVC is the clean design interface
between Model, View, and Controller.
MVC is software pattern for
implementing the user interface.
It divides a software application into
three interconnected parts which
makes the implementation of request
and response easier.
Model mainly consists of application data, business rules, logic and functions

Model contains the components which handles data directly from Database. It Includes
Business Components for Java (BC4J Objects) which mainly are:

Entity Objects (EO):


Entity Objects are generally based on one table which encapsulate the business rules.
These objects are used by OAF page to perform update/insert/delete operations. i.e. DML
Operations
You can join two EOs using Entity Associations. (AO)

View Objects (VO):


These objects contain a SQL query that queries the data from database and present it in
the OAF page.
VOs can be based on one or many EO's or a Plain SQL query.
Two VO can be linked together through a View Link (VL) .
VO can be a properties VO also which does not contain any Query .

Application Module (AM):


It is a container for related BC4J objects and provides the database connection.
It also provides Transaction Context (OADBTransaction) or Transaction Management.
An AM can have more nested AM contained in it along with other BC4J components. But it
is mandatory to have an AM for an OAF page.(Must be Specified in PageLayout of a main
Page)
View can be any output representation of information, such as a chart or a
diagram.
View is implemented by UIX (User Interface XML) and is stored in XML Format .
However to access an OAF page from front end, these page definitions must be
loaded in Oracle database i.e. MetadataServices (MDS).

Metadata Service (MDS)is a repository used for rendering of an OAF page. It is


implemented as a group of databasetables that stores the structure and properties
of the page components.

For standard pages delivered by Oracle, page definition XML files are stored
in$<PRODUCT>_TOP/mds directory. However these are only for reference purpose
and are not used at runtime

The view is updated with the change and the representation as given by the model
time to time.
The view in OAF comprises of various page level items like text fields, buttons,
regions, links etc. These are visible on any OAF page.

CONTROLLER: It accepts input and


converts it into commands for the
model or view..OAF requires a java
controller class to be defined for a
page/region which handles various
page level actions.

It has got three methods:


ProcessRequest( The request is
called when the page is rendered. Any
logic to be executed during page
initialization is kept here.)
ProcessFormRequest(HTTP Get)
ProcessFormData(HTTP Post)

HTTP Get :
Any page submit action causes
ProcessFormRequest to be executed.
The logic put here typically is that
which needs to be executed after
actions like button click or any other
page submit action.
The two objects that are passed to controller methods
areOAPageContextandOAWebBean.OAPageContextprovides
access to objects like AM class, page parameters, session values,
navigation methods.OAWebBeanis generally used to get a handle of
page items.

ProcessFormData(HTTP Post)

This method is used to modify the information and update the


information on the server.
When a user submits the page, the PFD method in the controller classis
invoked. The purpose of this method is to transfer the values from the
fieldson the screen into the cache.
Jdev dont include ProcessFormData in CO as default method --
why ???what is the real time purpose of this method? :
It fires when the page is submitted. This method transfer the data from
the fields into which user has entered the data into the server
cache(i.e. EO or VO cache whichever applicable).
This method is usually not overridden. The only reason to override this
method would be to apply the data to a custom/ non BC4J data model.
Data flow (Onion Structure )

The OA Framework can be extracted into a


series of concentric layers.
Each layer knows only about its next
consecutive layer.
The below figure shows the Onion
Structure, in which AM interacts with the
VO.
VO interacts with EO. EO interacts with
Data Base.

The core layer represents the database


and the surface layer represents the
application pages.
In between is a number of business logic
and user interface layers.
This layering allows for generic code and
components to be implemented at the
inner layers to maximize their reuse across
When a user runs the page, OA Framework does the following steps:-
Step a. OA Framework Requests page definition/structure from (MDS) --note its
cached too
Step b. MDS engine returns a xml file to OA Framework
Step c. Each node/component in XML(of Step b) is translated into a web bean
object. Let's say your page has
Region-Main
field1
Regionchild
Button

In this case, four web beans objects will be instantiated by OA Framework. A bean
object is nothing but an object representation components like fields, buttons,
regions etc. A bean object also has methods like setRendered, setRequired,
getRequired etc.
Step d. Not only we have beans created for that page, those beans are nested as
well, in exactly the same sequence of components within Region-Main. Hence
parent child relationship is retained.
Step e. After rendering the page,OA Framework then calls the controller class for
that MDS page. The page is displayed to user after processRequest in Controller is
completed
ADVANTAGES AND DISADVANTAGES OF OAF

The advantages of OAF are as follows:


End user Productivity
Enterprise Grade Performance and Scalability
Highly extensible Architecture
These pages have only region and items, so we can develop pages faster.
Transaction rate is high when compared to internet.
Application Customizability.
Developer Productivity.
It mostly does not require support and training for users and is user friendly.

The disadvantages of OAF are:


Cannot see the layout at design time.
OAF Pages are integrated / compatible only with the Oracle Apps.
Drag and Drop options are not available.
JDeveloper Installation Steps:-
JDEV Installation
Identify the correct version of JDeveloper. Steps
Download the JDeveloper patch from oracle.support.com
Unzip the JDeveloper patch.
Set the Environment variable for JDeveloper
Need DBC File
Sample OAF Page

You might also like