OAF Session Basics1
OAF Session Basics1
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
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:
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.
Model contains the components which handles data directly from Database. It Includes
Business Components for Java (BC4J Objects) which mainly are:
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.
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)
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