Home  >  Blog  >   Oracle OAF

Oracle Application Framework(OAF) Tutorial

Rating: 4
  
 
37131
  1. Share:

OAF Tutorial for Beginners

This tutorial gives you an overview and talks about the fundamentals of the Oracle Applications Framework. Oracle Application Framework (OA Framework) is the Oracle Applications development and deployment platform for HTML-based business applications.

 If you would like to Enrich your career with an Oracle Application Framework certified professional, Visit here Oracle Application Framework(OAF) Training

Simple Web Application Architecture (Servlet/JSP):

Simple Web Application Architecture

Initially, Web Applications was very simple ( developed in the 1990s )
Application Tier Contains a Web Server, which maintains the components such as Servlet, JSP

Component:

The component is a piece of code, which implements the well-defined interface.
A Single Component is not an Application.
An Application consists of many no. of components working together.
The component handles the complete task, such as Business Logic, Database Transactions Logic, and Presentation Logic.

Disadvantages :

1. Only One Application developer has to develop the complete component
2. Application developer has to concentrate on Business Logic, Database Transactions Logic as well as Presentation Logic.
3. Application Developer Must have the Multiple Skills
4. Development Time is more
5. Lot of confusion with Business Logic, Database Transactions Logic, and Presentation Logic since they are being developed as single components.
To overcome the above disadvantages MVC1 Architecture was introduced

MVC1 Architecture:

M ⇒ Model     V ⇒ View       C ⇒ Controller

MVC1 Architecture

Model:   Model Represents data object. Model is what is being manipulated and presented to the user

View:  Serves as Screen representation of Model. It is the object that presents the current state of the data objects.

Controller:  Defines the way the user interface reacts to the user’s input. The Controller component is the object that manipulates the model or data object.

In MVC1 Architecture

→ Servlet / JSP acts as View as well as Controller.

→ Java Bean acts as a Model Component.

Disadvantages :

  • Only One Application developer has to develop the component with Business Logic, as well as Presentation Logic.
  • The application developer has to concentrate on Business Logic as well as Presentation Logic.
  • Application Developer Must have the Multiple Skills
  • Resources such as Java developers and Web developers can not be used effectively
  • Development Time is more
  • A lot of confusion with Business Logic, Presentation Logic since they are being developed as a single component.

To overcome the above disadvantages MVC2 Architecture has been introduced

 MindMajix YouTube Channel

MVC2 Architecture :

Struts Framework follows the MVC2 Architecture

Servlet acts as Controller

→ Servlet acts as Controller
→ JSP acts as View
→ Java Bean acts as Model

Controller:

It is a java Servlet called Action Servlet. It receives a request from the web client and stores data into the Java Bean called as Form Bean (Model) and receives a response (success/fail) from the Form Bean. Based on the response from Form Bean, Action Servlet decides, which page (view) to be presented to the client.

Model:

It is Java Bean called Form Bean. It will receive the client data through the Controller and performs the data validations or database transactions such as DML and DQL operations. After performing database transactions it provides the data for the view.

View:

It is a JSP. It populates the data from the Form Bean ( Model ) and Present to the user.

Oracle Application Frame Work Architecture:

The architecture of Oracle Application FrameWork is similar to the Struts FrameWork but some difference is there.

Oracle Application Frame Work Architecture

AM ⇒ Application Module             VO  ⇒ View Object             EO ⇒ Entity Object

Controller:

→ It is a Java Class.
→ OAControllerImpl is a  parent of all Controller  Classes.
→ The controller performs database transactions through the Application Module interface.
→ It will get the data through the Application Module and Push into the View.

View:

→ It is JSP with GUI Components.
→ It populates data into its GUI components from VO.

Model: 
→ It is to interact with the Database through the BC4J Components.
→ It is a combination of Application Module, View Object, and Entity Object.

Application Module:

  • It is an interface given to the Controller Classes.
  • It is Mandatory for OAF Applications
  • It can be shared by multiple controllers.
  • It performs DQL operations through the View Object
  • It performs DML operations through the Entity Object.
  • OAApplicationModuleImpl ( Generic AM ) is a parent of the Application Module Class.
  • It is mandatory for all applications
Check Out: Oracle OAF Interview Questions

View Object:

  • SQL Query ( SELECT statement to project the data in the form  )
  • It should be stored in the .server package
  • View Object can be developed manually or BC4j wizard
  • OAViewObjectImpl: is the parent of all view objects
  • All APIs starts with OA

Entity Object:

  • It is a database object such as table, view and etc
  • DML operations will be performed on the Entity Object
  • It should be stored in the schema.server package
  • OAEntityImpl: is the parent of all Entity Objects

Onion Architecture of OA Framework

  • OA Framework can be extracted into a series of concentric layers, like an onion.
  • Each layer communicates with it top and bottom layers.

Oracle Application Frame Work Architecture

Key Features of MVC Architecture:

  • Integrated development environment
  • Durable personalizations and extensions
  • Consistent and compelling user interface
  • User interface interactivity
  • Object-oriented reuse
  • Oracle portal interoperability
  • Built-in security
  • Deployment environment

Comparison of D2k, OAF, and ADF

D2kOAFADF
Desk Top ApplicationIt is Frame with MVC ArchitectureIt is a Framework with MVC Architecture
It is a Client and Server ArchitectureIt is a 3-Tier ArchitectureIt is an N-Tier Architecture
From Builder used to develop the applicationsJDeveloper is used to develop the applicationsJDeveloper is used to develop the applications
PL/SQLJAVAJAVA
Drag and Drop featuresNo Drag and Drop featuresDrag and Drop features
Client and  Server ApplicationWeb ApplicationEnterprise Application

JDeveloper Installation and Setting Environment

1. Get the JDeveloper software ( ZIP File: p4141787_11i_GENERIC.zip )

2. Copy into required drive ( folder ) / ( C:)

Eg: C: JDEV  ( create JDEV ( name can be anyone ) folder in C-drive

3. Extract the ZIP file name p4141787_11i_GENERIC.zip )

Right-click ⇒ WinZip ⇒ ExtractToHere

    After extracting it generates the following

setting environment

4. Take the shortcut of C:JDEVjdevbinjdevbin jdevW.exe  to desktop

5. Copy the dbc file form Oracle Apps Server to JDeveloper

Source Oracle Apps path: D:oraclevisapplfnd11.5.0secureVIS_appsvis.dbc

JDevelopre Path: C:JDEVjdevhomejdevdbc_filessecure

6. Set the Environment variables of O/S

My Computer → Advanced → Environment Variables → New →

Variable Name: JDEV_USER_HOME

Variable Value : C:JDEVjdevhomejdev

OK → OK → OK

Testing Functionality of Jdeveloper

1. go to connection à Right Click à New database connection à Next à

Connection Name: test ( as desired )

Connection Type : Oracle ( JDBC )

Next :

2. User Name: apps

Password: apps

     Next

3. Driver: thin

Host Name: localhost ( if the database is on the local system, else URL of DB server )

JDBC Port: 1521

SID: VIS

For details see the vis.dbc located in the folder :

D:oraclevisapplfnd11.5.0secureVIS_apps

     APPS_JDBC_URL=jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=APPS.ora.com)(PORT=1521)))(CONNECT_DATA=(SID=VIS)))

     Next

4. Test Connection

Result : success

     Next

5. Finish

The packages, which are used in the OA Frame Work Applications.

There are six package used in the OA Frame Work Applications.

1) <3rd party identifier > .oracle.apps...[] .webui

2) <3rd party identifier > .oracle.apps...[] lov.webui

3) <3rd party identifier > .oracle.apps...[] .server

4) <3rd party identifier > .oracle.apps...[] lov.server

5) <3rd party identifier > .oracle.apps...[] poplist.server

6) <3rd party identifier > .oracle.apps...[] Schema.server

Steps to Develop the Application

Eg:

Hello Page

1. Create the workspace

2. Create the project

3. Create the package

4. Create the application module

5. Create the page

6. Set the properties of the page

AM Definition

Window Title

Title

1) Creation of Work Space

WorkSpace → Right-Click → New OA workspace

Directory Name: C:JDEVjdevbinjdevmyprojects

File Name: xxclinet.jws   ( jws → Java Work Space )

Select Add a  New OA Project

2) Creation of a project

Directory Name: C:JDEVjdevbinjdevmyprojects

Project name: First.jpr

Package Name: first.oracle.apps.po.hello.WebUI

Syntax: for Pack name

<3rd party identifier > .oracle.apps...[].webui

In the above

<3rd party identifier > → mycompany

→ po

→ requisition

[] → it is an optional ( as desired )

Next

Use Responsibility for design time

Supply the name of connection: test

Here New → to create a new connection

Edit → to change the name of the connection

Next   

DBC File Name : C:JDEVjdevhomejdevdbc_filessecurevis.dbc

User name: operations ( front end-user )

Password: welcome

Application short Name: PO

Responsibility key: PURCHASING_OPERATIONS

Next – Finish

3) Create a package

Right click on .jpr file → New Business Component Package → Next

Package Name : first.oracle.apps.po.hello.server

( Select Entity object mapped to database schema objects )

Next →

Connection Name: test

SQL Flavour: oracle

Type Map: oracle

Next →

User name: apps

Password: apps

Next → finish

Note: it generates test Connection

4) Create Application Module

Right Click on package → New Application Module → Next →

Name : TestAM

Package : first.oracle.apps.po.hello.server

Next →  Next → Next → Next → finish

Note: It generates the following files

1) TestAM.xml      

2) TestAMImpl.java

5) Creation of a Page

Right Click on .jpr file → New → Web Tier → OA Components → Page → OK

Name: HelloPG

Package : first.oracle.apps.po.hello.WebUI

Note: It generates   the file called: HelloPG.xml

6) Set the Properties of the page

Select the page → Structure →

Region1

Properties :

Id: mainRN

AM Definition: click on the list box and select the AM ( TestAM )

Window Title: Hello Page

Title:  Hello This is my First Page

( at least one of the above two 1) Window Title  2) Title   is required  )

7) Build the Application 

Right-click on .jpr → Re-build

8) Run the Page Go to XML  → Right Click → Run Page

Explore Oracle Application Framework Resumes! Download & Edit, Get Noticed by Top Employers! Download Now!

Working with items:

Adding Items to region

Before creating items take a header region ( as desired )

Naming Convention for Region :

Name Starts with purpose

Name ends with RN

Right Click on Region1(RootRN)/ (HeaderRN) → item

Text Field:

properties:

Id : UserId

Item Style : messageTextInput

Prompt : User Name

Data Type : VARCHAR2 ( As desired )

Comments : Created for Login User Id

Required : Yes ( Yes → Mandatory field, No → Optional )

Read only : True  ( to make it as read only filed, we can not edit the filed )

False → we can edit the filed.

( use for Id generating automatically , used with database sequence )

Disable : true ( to avoid the cursor focus into the text filed )

Maximum Length : the maximum that can be entered into the text filed.

Initial Value : default value

Additional Text : text to be displayed when muse over the item.

Rendered : false → to hide the text filed from the user.

CSS Class : setting back ground colors.

Length : Width of the text field, that can be visible to user

Height : 1 ( it will not generate multiple lines )

> 1 to generated the multiple lines automatically

Vertical Alignment : Top/Middle/Bottom ( Prompt alignment )

Tip Type : to display some hint message just below the text filed

Access Key : it is short cut key ( Alt + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 )

Secret : true ( password ***** )

To create next item click any item → new → item (or) right click on Region

Submit Button:

Id : Go

Item Style: submitButton ( it will have default action)

Prompt : Go

resetButton:

Id : Clear

Item Style : resetButton ( to clear the form)

Text : Clear ( prompt )

Access Key ( Short Key )

Normal Button:

Id : go

Item Style : Button

Prompt : as desired

Action Type : fireAction ( like a trigger to get the action )

It will be handled inside of controller class.

Images:

Copy the required Image into

C:JDEVjdevhomejdevmyhtmlOA_MEDIA

Item Style : Image

Image URI : ( imagefile.gif)

Additional Text : Mouse over message.

Link:

Id : lnk

Item Style : link

Text: Oracle Apps Home

Destination URI: HTTP://APPS.ORA.COM:8000

To Connect to Gmail site use:  HTTP://WWW.GMAIL.COM 

Check Box:

Id: job

Item style : messageCheckBox

Checked Value: MANAGER

Unchecked Value :

Initially Checked: true

The difference between Checkbox and Radio Button is that, Checkbox allows only single selection where as Radio Button allows Multiple Selection.

Radio Buttons :

First create RadiGroup

Next create Radio Buttons

Radio Group

Id : gender

Item style : messageRadioGroup

Data Type : VARCHAR2

Radio Button

Id : male

Item Style : messageRadioButton

Group Name : gender

Initial Vale : Male

Value Checked : Male

Prompt : MALE

Spacer: to provide the space between two components

Id : space

Height / Width  ( as desired )

Raw Text:  → to display some text

Id:

Item Style: rawText

Text : Oracle Apps Frame Work ( as desired )

Separator: to place the separator between components

Text Editor:

Id: address

Item Style: richTextEditor

Vertical alignment: Top

Spacer:  → to provide the space between two components

Date:

Id : hireDate

Item Style : messageTextInput

Data Type : DATE

Prompt : Date Of Joining

tipType : dateFormat

TipMessage (Hint Message): First store message into the database table called: FND_NEW_MESSAGES with the help of Apps front end.

Navigation:

Application Developer → Application → Messages

Join our newsletter
inbox

Stay updated with our newsletter, packed with Tutorials, Interview Questions, How-to's, Tips & Tricks, Latest Trends & Updates, and more ➤ Straight to your inbox!

Course Schedule
NameDates
Oracle Application Framework (OAF) TrainingApr 20 to May 05View Details
Oracle Application Framework (OAF) TrainingApr 23 to May 08View Details
Oracle Application Framework (OAF) TrainingApr 27 to May 12View Details
Oracle Application Framework (OAF) TrainingApr 30 to May 15View Details
Last updated: 04 Apr 2023
About Author

Yamuna Karumuri is a content writer at Mindmajix.com. Her passion lies in writing articles on IT platforms including Machine learning, PowerShell, DevOps, Data Science, Artificial Intelligence, Selenium, MSBI, and so on. You can connect with her via  LinkedIn.

read more
Recommended Courses

1 / 15