Upload
allahbaksh
View
849
Download
9
Embed Size (px)
Citation preview
<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
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
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
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
OA Framework Objectives
Enable significant application development productivity gains
Enable durable application extensibility & personalization Support compelling consistent UIs Support enterprise-grade reliability, performance &
scalability
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
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
Key Web App Components
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
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.
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
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
Architecture - Oracle Form
Splitting UI from Business Information
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
Model / View / ControllerDesign Pattern
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
A Stranger Is a Friend You Have Yet to Meet
Business Components
Business Components-Example
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
Physiology of an Application
Physiology of an Application The View – under the surface
Physiology of an Application The View – under the surface
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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.
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
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
Using JDeveloper OA Extn
About This page
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
Invoking JDeveloper From Unix
Invoking JDeveloper From Unix
Invoking JDeveloper From Unix
Invoking JDeveloper From Unix
Invoking JDeveloper From Unix
Invoking JDeveloper From Unix
JDeveloper Demo
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
Demo on DFF
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
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>
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
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.
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">
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
Menus in OAF
• Navigation menus • Controls how a user moves from one page to another• Use with responsibilities• Use Functions form and Menus form
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
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.
Menu UI: HTML Tabs
• The highest level of menus (Level 1 menus) usually correspond to main business flows within an application.
Menu UI: Subtabs
• Subtabs (Level 2 menus) provide further content divisions underneath particular tabs. Subtabs are optional.
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
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
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
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
Help
• http://www-apps.us.oracle.com/servlet/uix/fwk/fwksite/releases
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