oa framework
Post on 19-Nov-2014
766 Views
Preview:
TRANSCRIPT
OAF
Oracle Applications FrameworkOracle Applications Framework
OAF
AgendaAgenda
■ Understanding MVC Design Patterns
■ Understanding OA Framework and it's Architecture
■ Understanding the Basics of the Model
■ Understanding the Basics of the View
■ Understanding the Basics of the Controller
■ Demo
♦ Setting Up Your Development Environment
♦ Implementing First Page
♦ Implementing a Search
■ Other Concepts
OAF
PrerequisitesPrerequisites
■ OOPS – Must
■ Java – Must
■ JSP – Good To Have
■ Knowledge of frameworks based on MVC (Eg: Sturts) – Cake walk
OAF
Web Programming OverviewWeb Programming Overview
OAF
Web Programming with Java OverviewWeb Programming with Java Overview
■ HTTP (Hyper Text Transfer Protocol)
■ HTML
■ Request/Response
■ Element
■ Form
■ GET/POST
■ Cookie
■ Session
■ Servlet
■ JSP
OAF
Browser – Server CommunicationBrowser – Server Communication
OAF
Standard RequestStandard Request
OAF
JSP SendRedirectJSP SendRedirect
OAF
JSP – Forward JSP – Forward
OAF
JSP – ForwardJSP – Forward
OAF
MVC Architecture OverviewMVC Architecture Overview
OAF
MVC Design PatternMVC Design Pattern
■ MVC stands for Model-View-Controller
■ The Model is the actual internal representation
■ The View is a way of looking at or displaying the model
■ The Controller provides for user input and modification
OAF
MVC Design PatternMVC Design Pattern
Model
View
Controller
OAF
ModelModel
■ The Model is the part that does the work
■ The Model should be independent of the GUI
■ Independence gives flexibility, robustness
OAF
ViewView
■ View components present information to the user
■ Different views present the same model information in different ways
OAF
ControllerController
■ Controller accepts user inputs as events.
■ Events are translated into requests for the model or the associated view
■ Controllers should never include any kind of business logic
OAF
MVC with JSP: MVC1MVC with JSP: MVC1
OAF
MVC with JSP: MVC2MVC with JSP: MVC2
OAF
OA FrameworkOA Framework
OAF
What is OA Framework?What is OA Framework?
The Oracle Applications Framework (OA Framework) is the Oracle Applications development and deployment platform for HTML-based business applications.
OAF
OA Framework PhilosophyOA Framework Philosophy
■ End User Productivity
■ Enterprise-grade Performance and Scalability
■ Developer Productivity
■ Application Customizability
■ Open Standards
OAF
OA Framework ArchitectureOA Framework Architecture
ApplicationsProducts
OA Framework
UIX/BC4J
IAS 1.0.2.2Apache/JServ
Browser Database
■ 3-Tier Architecture
Application Server
OAF
OA Framework Architecture – MVC PatternOA Framework Architecture – MVC Pattern
OAF
Components of MVC ArchitectureComponents of MVC Architecture
■ Model: Implemented using Oracle Business Components for Java (BC4J).
■ View: Implemented using UI XML (UIX).
■ Controller: pure Java class
OAF
The ModelThe Model
■ The model encapsulates the underlying data and business logic of the application.
Model Consist of
♦ BC4J Components► Entity Objects (EO) ( and Association Objects)
► View Objects (VOs) (and View Links)
► Application Module (AM)
♦ OADBTransaction
OAF
The Model - Entity Objects (EO)The Model - Entity Objects (EO)■ BC4J Entity Objects are defined on table or views or synonyms or
snapshots
■ There is a one-to-one mapping between a table and an Entity Object.
■ Entity objects should include all columns in their associated tables.
■ Entity objects encapsulate the business rules associated with a row in a database table.
■ Entity Objects are subclasses of oracle.apps.fnd.framework.server.OAEntityImpl
■ PL/SQL EOs are used to call database procedures
■ Association Objects
♦ Enables to create relation ships between Eos
♦ Two types of Associations► Composition
► Reference
OAF
EO Creation - DemoEO Creation - Demo
OAF
The Model - View Objects (VO)The Model - View Objects (VO)■ BC4J view object encapsulates a database query
■ View Object can be defined
♦ Simple SQL statement
♦ Map to Entity Object
♦ Map to Entity Objects and SQL
■ VO Uses
♦ Present data that is optimized for a particular user interface – Use EO
♦ Create simple queries for pop lists, lists of values and other supporting UI components – Use simple SQL Query
♦ Create efficient "validation queries" that can be used in your business logic – Use simple SQL Query
■ VO should be based on EO when there is insert/update to DB.
■ View Objects are subclasses of oracle.apps.fnd.framework.server.OAViewObjectImpl
■ View Links
OAF
VO Creation - DemoVO Creation - Demo
OAF
The Model – Application ModuleThe Model – Application Module■ A BC4J application module is a container that manages and provides access to
BC4J objects.
■ Each OA Framework page has a "root" application module which is associated with the top-level page region.
■ The root application module provides transaction context and establishes a database connection.
♦ If multiple pages participate in the transaction, they should share the same root application module.
♦ If a page functions independently of any other, it should have its own application module.
■ The application module is an appropriate place
♦ Provides access to any associated BC4J objects
♦ Performs multiple server-side actions
♦ Returns server side values to the client
♦ Calls PL/SQL routines.
■ AMs are subclasses of oracle.apps.fnd.framework.server.OAApplicationModuleImpl
OAF
AM Creation - DemoAM Creation - Demo
OAF
The Model – OADBTransactionThe Model – OADBTransaction■ OADBTransaction encapsulates the JDBC connection/database session
associated with a root application module.
■ Owns any entity objects
■ OADBTransaction is used in code for
♦ Creating a callable statement for executing PL/SQL functions and procedures
♦ Accessing session-level Applications context information like the user's name, id, current responsibility
OAF
The ModelThe Model
OAF
The View - UIXThe View - UIX
■ UIX – User Interface XML
■ Creates UI Components hierarchy on the page
■ Coordinates browser and middle-tier
■ Uses BC4J to fetch and update data
■ Imported into MDS
■ Enables User Personalization & Extensions
■ View is implemented as Regions and Items
OAF
The View - UIXThe View - UIX
OAF
Page Creation - DemoPage Creation - Demo
OAF
The ControllerThe Controller■ The controller responds to user actions and directs application flow
■ Controller is Coded to
♦ Manipulate/initialize the UI at runtime
♦ Intercept and handle user events like button presses
■ Controllers should never include any kind of business logic
■ Controller is a Subclass of oracle.apps.fnd.framework.webui.OAControllerImpl
■ Request Handling
♦ Check Out or Create AM
♦ Validate Session
♦ HTTP GET
► Creates web bean hierarchy
► Calls processRequest()
♦ HTTP POST
► Checks if web bean hierarchy exists in memory, if not creates the same
► Calls processFormRequest()
OAF
Controller Creation - DemoController Creation - Demo
OAF
OA Framework – MVCOA Framework – MVC
OAF
MVC InteractionMVC Interaction
OAF
Development EnvironmentDevelopment Environment
■ System Requirements
♦ Operating Systems: Windows 2000 or Windows XP.
♦ Preferred Web Browser: Internet Explorer 5.0 or later
♦ CPU Type and Speed: Pentium IV 1 GHz or greater
♦ Memory: 512 MB RAM
♦ Display: 65536 colors, set to at least 1024 X 768 resolution
♦ Disk Space: 570 MB
■ Patch 4045639 (download from metalink)
OAF
Setting Up Development Environment - DemoSetting Up Development Environment - Demo
OAF
Implementing Your First Page (Helloworld) - Implementing Your First Page (Helloworld) - DemoDemo
OAF
Implementing a Search - DemoImplementing a Search - Demo
OAF
OA Personalization & Extension - DemoOA Personalization & Extension - Demo
OAF
DeploymentDeployment
■ ftp Files $OA_JAVA
■ Import pages into MDS
♦ <JDEV Installation Directory>\jdevbin\jdev\bin\import <JDEV Installation Directory>\jdevhome\jdev\myprojects\<client>\oracle\apps\....\webui -jdk13 -mmddir "<JDEV Installation Directory>\jdevhome\jdev\myhtml\OA_HTML\jrad" -username apps -password apps -rootdir D:\D\JDEV\p4045639\jdevhome\jdev\myprojects\ -validate -dbconnection "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = appsnet.wipro.com)(PORT = 1523))) (CONNECT_DATA = (SID = VIS)))"
■ Import substitutions (if any) into MDS
♦ <JDEV Installation Directory>\jdevbin\jdev\bin\jpximport <JDEV Installation Directory>\jdevhome\jdev\myprojects\<jpxfilename>.jpx -username apps -password apps -dbconnection "(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = appsnet.wipro.com)(PORT = 1523))) (CONNECT_DATA = (SID = VIS)))"
■ Bounce Apache
OAF
DeploymentDeployment■ Create AOL Function
♦ Type: SSWA jsp function
♦ HTML Call: OA.jsp?page=/<client>/oracle/apps/<module>/…./webui/<PageName>PG
■ Attach to Menu
■ Personalize (If any)
OAF
Q & A
OAF
What Next?
OAF
Thank You
top related