88
<Insert Picture Here> Oracle Applications Framework (OAF) 23/02/07 Suneeta Kowtharapu * * Collated from PPT of Andreas Stellatos, Anthony Go, Jody Clayton, George Kellner, Helen Moses

OAF Basics

Embed Size (px)

Citation preview

Page 1: OAF Basics

<Insert Picture Here>

Oracle Applications Framework (OAF)23/02/07

Suneeta Kowtharapu*

* Collated from PPT of Andreas Stellatos, Anthony Go, Jody Clayton, George Kellner, Helen Moses

Page 2: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 3: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 4: OAF Basics

The Oracle Applications Framework (OA Framework) is the Oracle Applications development and deployment platform for HTML-based business applications.

100% Java & XML J2EE based, middle-tier application framework and services for the rapid development & deployment of HTML based applications

Definition

Page 5: OAF Basics

OA Framework Objectives

Enable significant application development productivity gains

Enable durable application extensibility & personalization Support compelling consistent UIs Support enterprise-grade reliability, performance &

scalability

Page 6: OAF Basics

Declarative application development “Protects developers from technology” Built-in durable personalizations Extensible UI and business logic J2EE Based, Java & XML on Oracle platform Commitment to MVC architecture OA Framework - option of choice

OA Framework - Philosophy

Page 7: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 8: OAF Basics

Key Web App Components

Page 9: OAF Basics

Key Web App Components•The browser communicates with the middle tier using HTTP (Hyper Text Transfer Protocol) which involves sending a request message to which the middle tier replies with a response message.

•A JSP is a file with some HTML and Java code that executes top to bottom. At runtime, it is compiled into a Java class which is actually a servlet.

•A servlet is a Java-based web application server extension program that implement’s the functionality in the page either by itself of by calling other objects

Page 10: OAF Basics

Key Web App Components• A servlet session is a mechanism for maintaining state between HTTP requests.It usually corresponds to an application login/logout cycle

• A JavaBean (or "bean" for short) is a reusable component that implements specific design patterns

• Any objects in the middle tier that communicate with the database use a JDBC (Java Database Connectivity) driver.

Page 11: OAF Basics

Get/Post

• Get• User clicks on a link/image associated with an URL• Parameters are sent as part of the URL• Max size of the URL is restricted to 256 chars

• Post• User clicks on a link that does a form Submit• Parameters sent are not visible on the URL• Any amount of data can be sent

Page 12: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 13: OAF Basics

Architecture - Oracle Form

Page 14: OAF Basics

Splitting UI from Business Information

Page 15: OAF Basics

Architecture Overview

Declarative, MVC architecture

Controller

Model View

A component-based design with clean interfaces among model, view, and controller objects

The model encapsulates the underlying data andbusiness logic of the application

The view formats and presents data from a

model to the user

The controller responds touser actions and directs

application flow

FlowsUI ObjectsDB Objects

Meta-data

Page 16: OAF Basics

Model / View / ControllerDesign Pattern

Page 17: OAF Basics

Architecture Components• BC4J - Java business components for representing business

logic• UIX - Java components for representing UI• OA Extension – Declarative data for UI

Extension to Jdeveloper• AOL/J - Applications authentication, authorization and java

services• OA Framework - Programmatic ‘glue’ which integrates these

technologies

Page 18: OAF Basics

A Stranger Is a Friend You Have Yet to Meet

Page 19: OAF Basics

Business Components

Page 20: OAF Basics

Business Components-Example

Page 21: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 22: OAF Basics

Physiology of an Application

Page 23: OAF Basics

Physiology of an Application The View – under the surface

Page 24: OAF Basics

Physiology of an Application The View – under the surface

Page 25: OAF Basics

Physiology of an Application The View – technology beneath

Page Hierarchy

Meta Data

OA Framework RuntimeOA Framework Design time

UIX Bean Hierarchy

UIXRenderers

JSP/HTML

Browser

.XML

Cache

Page 26: OAF Basics

Physiology of an Application The Controller – user interaction

Apply

G

User takes an actionBrowsersendsrequesttoController

Meta DataWorkflow

Model

Controller

1. Controller delegates data processing to Model

2. Determines next page3. Invokes View to present

the next page to user

View

Page 27: OAF Basics

Physiology of an Application The Model – data processing

DatabaseTables,Views

PL/SQL

Entity Objects (EO)View Objects (EO)

Application Module(AM)

Application Module(AM)

DMLValidationsDefaulting

UIX Bean Hierarchy

BC4J OBJECTS

.XML

Page 28: OAF Basics

PoplistText Field

Page Hierarchy & Model

Region/Header

Radio Button

Table

Text Field

MDS Items

Page Root AM

AM

VO

Attr

BC4J References

Attr

Default Renderer

Page 29: OAF Basics

Model: Application Modules

• Application Modules serve as containers for related BC4J objects

• The objects are related by participating in the same task (for example, a multi-page UI for creating purchase orders)

• Application Modules provide transaction context• Application Modules establish database

connections

Page 30: OAF Basics

Model: View Objects

• View Objects• Encapsulate a database query• Provide iteration over the query result set• Can be based on

• Plain SQL • Multiple entity objects

• Provide single point of contact for getting and setting entity object values

• May be linked together by view links

Page 31: OAF Basics

Model: Entity Objects

Entity objects• Encapsulate business rules and logic• Are used by any program that inserts, updates, or

deletes data• Provide consistent data validation across all

applications• May be linked to other entity objects by entity

association objects

Page 32: OAF Basics

Event Flow in OA Framework

• Two main events in OAController• processRequest - used for HTTP GET (URL)• processFormRequest - used for HTTP POST (Form

Submit)• Form submits (button presses) are directed back to the

original OAController• Several other events are available for overriding default

Framework behavior

Page 33: OAF Basics

HTTP GET Event Flow – Overview

1. Get info and validate user2. Fetch metadata3. Validate Root AM4. Instantiate BC4J and UIX objects5. Walk UIX tree and call processRequest() on controllers6. Perform post processing for complex beans7. UIX renders page

Page 34: OAF Basics

HTTP GET Event FlowGet info and validate user

• Get valid ICX session cookie (from SSO)• DBC (database) information passed in on URL from portal

• Cached on the session after first URL• URL also provides root region / page:• Validate user through AOL/J• Fetch the metadata

Page 35: OAF Basics

HTTP GET Event FlowValidate Root AM

• Instantiate the root BC4J Application Module (AM) • AM associated with page is the root AM – holds the

connection• Application Modules are pulled from AM pool if available or may

be new objects• AM uses DBC info to create database connection (or reuse

existing connection)• Validate session on root AM • Validate function associated with page

Page 36: OAF Basics

HTTP GET Event FlowInstantiate BC4J and UIX Classes

• Convert metadata to OA bean hierarchy• OA beans are extensions of UIX beans

• Instantiate associated BC4J objects• Place bound values on beans that require binding• Cache bean hierarchy on root AM

Page 37: OAF Basics

HTTP GET Event FlowprocessRequest()

• Walk UIX tree and instantiate controller classes• Call processRequest() on controllers

• Developers can query data for the UI (vo.executeQuery) and set programmatic properties

• Perform post-processing on complex beans• OAPageLayoutBean and OATableBean for example• This post-processing can be initiated from

processRequest() by calling prepareForRendering()

• Places data binding objects on rendering context

Page 38: OAF Basics

HTTP Post Event Flow – Overview

1. Validate user2. Retrieve AM and bean hierarchy if saved3. Walk UIX tree and call processFormData() on controllers

• Apply form data back to underlying objects4. Walk UIX tree and call processFormRequest() on controllers5. If no redirect then refresh the page

Page 39: OAF Basics

HTTP Post Event FlowValidate User and Retrieve State

• Validate the user as in GET• Retrieve AM and cached copy of bean hierarchy

• If not available or out of synch go through processRequest logic again to recreate bean hierarchy

• Validate session and function as in GET• Call ProcessFormRequest() on controller.

Page 40: OAF Basics

Model : Code

• Model source code is stored as Java and XML files• The properties of the objects are stored in XML and the

actual Business logic (validations) are stored in Java files

• Available in $JAVA_TOP/oracle/apps/<prod>/<subcomp1>/../server

• Named as *EO.xml, *VO.xml, *AM.xml, *EOImpl.class, *VOImpl.class, *VORowImpl.class, *AMImpl.class

Page 41: OAF Basics

Layered Reusability

Entity Objects

DB

ViewObjects

ApplicationModules

OAControllers

dataflow up stack (pull)

dataflow down stack (push)

• Each layer only “knows” about the layers below it.

• This allows reuse at any of the layer boundaries.

Page 42: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 43: OAF Basics

OAF Components

Web Server Data Server

BrowserUI

Meta DataRepository

Web

Lis

tene

r

BC4JApplicationBusiness

Logic

AOL/JMenus,Security, Messages, etc

UIXHTML UI Generator

JavaControllerProgrammaticUI Definition

Serv

let E

ngin

e

Desktop

UIMeta DataDefinition

ApplicationsSchema

Portal SSO LDAP

J2EE Oracle 9iAS

Page 44: OAF Basics

Using JDeveloper OA Extn

Page 45: OAF Basics

About This page

Page 46: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 47: OAF Basics

Invoking JDeveloper From Unix

Page 48: OAF Basics

Invoking JDeveloper From Unix

Page 49: OAF Basics

Invoking JDeveloper From Unix

Page 50: OAF Basics

Invoking JDeveloper From Unix

Page 51: OAF Basics

Invoking JDeveloper From Unix

Page 52: OAF Basics

Invoking JDeveloper From Unix

Page 53: OAF Basics

JDeveloper Demo

Page 54: OAF Basics

Demo on DFF

Page 55: OAF Basics

Demo on DFF

Page 56: OAF Basics

Demo on DFF

Page 57: OAF Basics

Demo on DFF

Page 58: OAF Basics

Demo on DFF

Page 59: OAF Basics

Demo on DFF

Page 60: OAF Basics

Demo on DFF

Page 61: OAF Basics

Demo on DFF

Page 62: OAF Basics

Demo on DFF

Page 63: OAF Basics

Demo on DFF

Page 64: OAF Basics

Demo on DFF

Page 65: OAF Basics

Demo on DFF

Page 66: OAF Basics

Demo on DFF

Page 67: OAF Basics

Demo on DFF

Page 68: OAF Basics

Demo on DFF

Page 69: OAF Basics

Demo on DFF

Page 70: OAF Basics

Demo on DFF

Page 71: OAF Basics

Demo on DFF

Page 72: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components JDeveloper Demo Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 73: OAF Basics

Dir Structure : JAVA_TOP

webui

bpa

$JAVA_TOP/oracle/apps/ar

server

poplist

creditmgt irec <other comp>

<name>CO.class<name>EO.xml

<name>VO.xml

<name>AM.xml

<name>EOImpl.class

<name>VOImpl.class

<name>VORowImpl.class

<name>AMImpl.class

util <subcomp2>lov

serverwebui server

<Subcomp1>

Page 74: OAF Basics

Dir Structure : PROD_TOP

lov

bpa

$AR_TOP/mds

<subcomp1> <subcomp2>

creditmgt irec <other comp>

webui webui

poplist

webui<name>PG.xml

<mae>PAGE.xml<name>PG.xml

<mae>PAGE.xml<name>PG.xml

<mae>PAGE.xml

Page 75: OAF Basics

How to find the relevant code

• Start from URL• http://celalnx7.us.oracle.com:10103/OA_HTML/OA.jsp?_rc=A

RCMANALYSISVIEWACCTDPAGE&_ri=222&.....&OAHP=ARCMMENUAPPLICATION...

• ARCMANALYSISVIEWACCTDPAGE.xml would be in $AR_TOP/mds directory.

Page 76: OAF Basics

How to find the relevant code

• ARCMANALYSISVIEWACCTDPAGE.xml<content><oa:pageLayout id="ARCMANALYSISVIEWACCTDPAGE"

akRegionCode="ARCMANALYSISVIEWACCTDPAGE"regionName="AR CM Analaysis View Account Detail Page"amDefName="oracle.apps.ar.creditmgt.analysis.server.CreditAnalysisAM"controllerClass="oracle.apps.ar.creditmgt.analysis.webui.ArCmAnalysisAcctDetailPageCO" windowTitle="Oracle Credit Management" helpTarget="cf_crdata">

Page 77: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 78: OAF Basics

Menus in OAF

• Navigation menus • Controls how a user moves from one page to another• Use with responsibilities• Use Functions form and Menus form

Page 79: OAF Basics

Register Functions

• Use the Functions form to associate a page URL with a function name • System Administrator or Application Developer responsibility• Function Type is SSWA JSP Function

Page 80: OAF Basics

Menu UI: Global Menu

• The global menu provides application-wide functionality.

• The appearance of the icons, as well as whether certain choices appear at all, is controlled by profile options.

• Developers can add application-specific global buttons.

Page 81: OAF Basics

Menu UI: HTML Tabs

• The highest level of menus (Level 1 menus) usually correspond to main business flows within an application.

Page 82: OAF Basics

Menu UI: Subtabs

• Subtabs (Level 2 menus) provide further content divisions underneath particular tabs. Subtabs are optional.

Page 83: OAF Basics

Create a new OA Workspace & Project in JDeveloper

Create a new Page XML Files & BC4J components using JDeveloper Wizard as per your requirement

Compile the work & create Class Files

Copy Class files to JAVA_TOP on server

Use “import” utility OR “ java oracle.jrad.tools.xml.importer.XMLImporter” to put Page XML

file in server

Register the Page XML file as an SSWA function

Add this function to a Menu & Responsibility

Bounce Apache

DEPLOYMENT STEPS

Page 84: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 85: OAF Basics

New in Oracle Applications Framework 5.10

• Performance improvements• less images, graphics• partial page rendering using iFrames• Fast enough for Cellular Data Network use

• Documentation and Tutorials rewritten• Available for Consulting and Customers to use• Limited Early Adopter programme running• Could support hand held devices

Page 86: OAF Basics

Introduction Pre-Req Concepts Architecture Overview Physiology of an Application Components Files & Directory Structure Menus & Functions New Features in OAF 11.5.10 Help

Agenda

Page 88: OAF Basics

Summary

• OAF is the Oracle Applications self-service development and deployment platform

• 100% Java based, architected unified platform with durable extensibility and personalization features

• Leverages best architecture and technologies that slashes implementation and operating costs, maximizes business performance while insuring a differentiated deployment