OAF Introduction


OAF Model & Architecture

1. Model View Controller

 

image1

OA Framework is based on the industry-standard J2EE MVC design pattern. The MVC architecture is a component-based design pattern with clean interfaces between the Model, View, and Controller. The Model is where the application implements its business logic. The View is where the application implements its user interface and the Controller is where the application handles user interaction and directs business flow

2. Object Oriented reuse – onion

image23.OAF 3. OAF Components

EO, VO, CO, AM and Pages

3.1: Entity Objects

  • The entity objects are used if one wishes to do some insert/update operations.
  • Entity Objects represents a Data Base Row of a table.
  • Entity Objects will be based on the View (Oracle View), Synonyms or snapshots.
  • We need to create Entity Object if we want to perform DML operations on the OAF Page.
  • All the Entity Objects end with the EO

3.2: View Objects

  • View Objects are used when we want some data to be displayed on page.
  • View Objects are used just for displaying purpose.
  • View Objects access the result set of a SQL statement, it can be either based on the Entity Object or plain SQL query.
  • All the view objects ends with the VO

3.3: Application Module

  • It is very important component in the Model.
  • Every Oracle Application Framework (OAF) page should be attached to some Application Module.
  • It is the interface between the Client transactions and Data Base transactions.
  • All the application module objects end with AM.

3.4: Controller

  • Controller will take care of the web browser activities.
  • The controller manages the flow between pages.
  • Controller responds to the user actions and directs application flow.
  • The controller will request from HTTP get and HTTP post.
  • All the controllers end with the CO

4. EBS Directory structure

    1. EO-related (business logic) .class and .xml files in oracle.apps.<application shortname>. <module>.schema.server
    2. AM and VO (UI-related logic) .class and .xml files in oracle.apps.<application shortname>. <module>.server
    3. CO and PG in oracle.apps.<application shortname>. <module>.webui
    4. Poplist- and LOV-related VO and AM .class and .xml files in oracle.apps.<application shortname>.<module>.poplist.server  and oracle.apps.<application shortname>. <module>.lov.server

Note: For custom implementations follow the structure as <company>.oracle.apps.<application shortname>.<custommodule>…

On EBS server, application structure starts from $JAVA_TOP

How to find EBS version and relevant JDEV patch

Login to the Applications.

image3

Once we navigate to About this Page. we can find OAF versions ( from Technology Components) section and as well as DBC file location from Java System Properties.

image6

Finding the correct version of Jdeveloper for EBS in Metalink Note ID 416708.1

image5

 

DBC File Location

image6

Setting up Jdev and Creating database connection

  1. Look for correct patch in Metalink Note ID 416708.1
  2. JDEV10 for R12 (p9879989_R12_GENERIC).
  3. Unzip it to a folder and create an environment user variable JDEV_USER_HOME to point to <jdevinstalledpath>\jdevhome\jdev
  4. Jdev exe will be in D:\OAFR12\jdevbin\jdev\bin. If there are any previous jdev versions in system it will prompt whether to migrate changes from previous version. Select NO
  5. Get the dbc file from server for database connectivity from client
  6. It will be in FND_SECURE and this will be used by application to connect to database. You can place it in jdevhome\jdev\dbc_files\secure
  7. Create New Database connection

image7

 

image8

image9

image10

image11

Note: Either you can select SID or Service name as per your tns definition

Workspace & Project

In JDeveloper, the source code files that make up your programs can be organized into projects. A project can contain one or more files representing different “tiers” of a multi-tier application, or different subsystems of a very complex application. Projects, in turn, are organized into workspaces. A workspace might consist of multiple projects, all of which make up an entire application. You can have as many workspaces as you like open at one time

Creating workspace

In Application Navigator, right click on Applications and select New OA Workspace.

image12

Specify the name of workspace and path to store it. Workspace files will have extension of jws. Generally they will be saved under JDEV_USER_HOME\myprojects

Note: Here “Add a New OA Project” is by default checked so project will be automatically get created. Here it is unchecked because we will create project manually in next step

image13

Creating project

In Application Navigator, right click on workspace trng2 created in above step and select “New OA Project”

image14

image15

Default package specify where the custom application objects should reside

image16

Note: This is not mandatory to check “Use Repository for Design Time” until you don’t want to design anything related to DB objects

image17

DBC File name: Select the dbc file having connection properties of the server to which you want to connect from your client. You can get this from server under $FND_SECURE

User Name/Password: Should be EBS application user name and password

Application Short Name: Should be application short name in which your custom code to register

Responsibility Key: EBS responsibility key. This responsibility should exist for the application user you specified otherwise you cannot run the application from client

Setting Project Properties

image18

image19

Select OADeveloperMode and OADiagnostic, and move them to the On Options List. OADeveloperMode provides extra code checking and standards checking at runtime. OADiagnostic enables the Diagnostics button in the global buttons at the top of the page, overriding any corresponding profile option set for the application. You should always have these two modes turned on during development