Monday, July 11, 2016

About Controller

About 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.
  • When we create controller on subclass will generate.
one
Controllers have three methods:
  1. Process Request (HTTP get).
  2. Process Form Request (HTTP post).
  3. Process Form Data.
HTTP get:This is used while loading the page.
HTTP post: After loading the page if we want changes.
Process Request: This method will handle HTTP get example while loading the page displaying the default items.
Process Form Request: This method will handle HTTP post.After loading the page if we want to perform any actions then we go for process form request.
Process Form Data: This page is invoked upon a browser ‘post’. During this phase the framework will automatically applies changes back to the underlying view objects. Rarely custom code is required in this phase. If exceptions are thrown during this phase the phase is skipped and the page redisplays with the error message.
There are two parameters in the controller:
1) OAPageContext
2) OAWebBean
OAPageContext:
  • To get and set values of the fields using the OAPageContext.getparatmeter and OAPageContext.putparameter.
  • To call one page to another page OAPageContext.setforwardURL.
  • To redirect the current page itself use OAPageContext.forwardImmediatelyToCurrentPage (or) OAPageContext.sendRedirect and many more.
OAWebBean:
  • Each and every field we have properties and the properties define the behavior of item.
  • OAWebBean represents the Hierarchy/Structure of the components in the page.
  • WebBean represents the properties of item.
As we discussed what Model, View, and Controller is, look at the below figure which shows that how they generally interact with each other or how the data flow between them is.
two

About View

About View

  • View is the actual output OAF page what an end user can able to see.

  • In Oracle Apps Framework View is implemented using UIX technology, whereas UIX means User Interface XML.

  • Whenever we run the page in JDeveloper then automatically UIX will generate web.xml file.

  • The power of UIX is that allows metadata to be translated to an HTML page for a web browser or mobile device browsers.

  • The generated web.xml file will be converted into HTML format of OAF page.

  • Since web.xml file here will work as a cache memory.

  • Whenever we want to move the web.xml file into the server side then MDS repository is used to move the web.xml file into the server.

  • MDS stands for Meta Data Service and in the application top we will be having MDS folder.

  • When we deploy all the OAF page destination paths, regions then the files will be stored into the MDS tables.

  • The MDS table are like:

JDR_Paths:Stores the path of the documents, OA Framework pages and their parent child relationship.
JDR_Components:Stores components on documents and OA Framework pages.
JDR_Attributes:Stores attributes of components on documents and OA Framework pages.
JDR_ATTRIBUTES_TRANS:Stores translated attribute values of document components or OA framework pages.
JDR_DOCUMENT_ID_S:  This is a sequence generator table.

  • MDS can be managed using standard database procedures and tools.

View Objects and View Links

View Objects and View Links

View Objects
  • View Objects are used where 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
Example: employeeVO
  • When we create the View Object (VO) one subclass will generate with setters and getters method.entati2
We have four types of View Objects and they are:
1) Manual VO
2) Automatic VO
3) Validation VO
4) Property VO

Manual VO: If we are writing our own SQL query then it will be called as Manual VO.

Automatic VO: Automatic VO is when we select an Entity Object automatically it will select the Query.

Difference between Manual and Automatic VO is:

  •  If we want to perform DML operations then we can go for VO that should be based on Entity Object.
  •  We go for Manual VO if we are using simple SELECT statement.

NOTE: Note that when we create VO (View Object) all the table columns will be converted into attributes, hence here we call columns as attributes.

Validation VO:Validating the data in the Data Base, example using WHERE condition in the SELECT statement.
Property VO:Attributes / columns without Data Base columns comes under property VO. These attributes are also called as Transient attributes.

Example: Suppose there is a table which holds student marks so therefore it contains 6 columns to hold six subject marks for each student. There is no total column in the table to store the total marks of the student separately. Now in the output for display purpose we are taking TOTAL attribute hence which is not from Data Base table and this TOTAL attribute is called Transient attribute.

View Links
Relationship between two View Objects having one common column in both the VO’s is called View Link. All the View Link objects end with the VL
Example: DeptEmpVL
Note that if we want to display Master Detail data then we go for View Links, where as if we want to perform DML operations on Master Detail data we go for Entity Association.
The below figure shows that how View Objects and View Links are interacting with Data Base, VO interacts with Data Base Directly or VO interacts with Data Base through the EO.
view link

Entity Objects and Entity Association

Entity Objects and Entity Association

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.

Example:  employeeEO
  • When we create Entity Object (EO) one subclass will generate.
Employee

We have two types of Entity Objects
  1. PL/SQL based Entity Objects
  2. Java based Entity Objects

Note that we have two types of tables in Oracle Apps they are Custom Tables and Seeded Tables.
If we want to perform the DML operations on the standard (Seeded) table then we go for PL/SQL based Entity Object and if we want to perform the DML operations on the custom table then we go for Java Based Entity Object.

Entity Association
  • Entity Association is the relationship between two Entity Objects having one common column.
  • All the Entity Association ends with the AO (Association Object).
Example:  EmpDeptAO
  • If we want to perform DML operations on Master Detail page then we go for Entity Association.
  • If we want to common know column between two tables then we will go for Entity Association.

About Model..

About Model..

The entire Database related transactions in OAF pages will be taken care by the MODEL.
  • Model is where the application implements business logic.
  • Model will implement all the Data Base transactions.
  • Model component is implemented using BC4J where BC4J is Business Component for Java.
  • BC4J consists of three components:
      • Entity Object and Entity Associations
      • View Objects and View Links
      • Application Module
Model contains six components including BC4J components, additionally the other three components are:
    • Callable Statement
    • Prepare Statement
    • OADB Transactions
Callable statement is used to call a PL/SQL statements, Prepare statements are used if we are using single SELECT statement, and OADB transactions will take care of Oracle APPS related Data Base transactions.
model

Advantages & Disadvantages of OAF

Advantages & Disadvantages of OAF

The advantages of OAF are as follows:
1) End user Productivity
2) Enterprise Grade Performance and Scalability
3) Highly extensible Architecture
4) Browser Look and Feel of all the pages in application.
5) Open Standards such as XML, HTML, Java, JSP, SQL, and Web Services.
6) Application Customizability.
7) Developer Productivity.
The disadvantages of OAF are:
i) Cannot see the layout at design time.
ii) OAF Pages are integrated / compatible only with the Oracle Apps.
iii) Drag and Drop options are not available.
iv)  More R&D is required to design a form layout which is time consuming.

Structure of OAF

Let us discuss about the structure of OAF.
OAF follows J2EE Architecture and J2EE follows MVC architecture so therefore ultimately OAF follows MVC Architecture.
The abbreviation of MVC is Model View Controller.
MVC is the clean design interface between Model, View, and Controller.
Structure of OAF
Model will take care the Data Base related Transactions, Model contains the following:

Entity Object (EO)
View Object (VO)
Callable Statement (PL/SQL Statement)
Prepare Statement (Single Select Statement)
OADB Transactions (Oracle Apps Data Base Transactions)

View is nothing but the OAF Page Output. View is implemented by UIX (User Interface XML).

Controller will take care of web browser activities like HTTP Get and HTTP Post
Controller have got three methods:
Process Request
Process Forms Request (HTTP Get)
Process Form Data (HTTP Post)
HTTP get: While loading the Page we use HTTP Get.
HTTP Post : After Loading the page if we want any changes the we use HTTP Post.
We will discuss in detail about MVC architecture in the next chapters.
The Below figure shows the interaction between Model, View, and Controller.

controller

Onion Structure of OAF
Another structure of OAF is called Onion structure.
The OA Framework can be extracted into a series of concentric layers.
Each layer knows only about the layers below to them.
The below figure shows the Onion Structure, in which AM interacts with the VO and VO interacts with EO and finally EO interacts with Database.

OAF

Difference Between OAF and Oracle Forms

Difference Between OAF and Oracle Forms

Let us discuss some difference in OAF pages and Oracle Forms.  The below table lists out the differences between OAD and Oracle Forms.

OAFOracle FORMS
OAF Follows MVC architecture and Client ServerArchitectureForms Follows only Client Server Architecture
OAF pages are light weight componentsForms are not light weight
OAF Pages can send through mobile devicesCannot send to mobile devices
OAF Pages can connect in Oracle Apps Local MachineCannot (NOT APPLICABLE)
Look and Feel is goodNot better when comparing to OAF
OAF pages are integrated with the Java TopForms are integrated with Application Top
Commit always takes place in the Application Module’s (AM) Java code. When a commit takes place, the data from OA Framework Cache is transferred to the database.The COMMIT_FORM or DO_KEY(‘COMMIT_FORM’) commands can be invoked from any trigger that allows restricted procedures.
A page is divided into regions. Regions contain fields, buttons, tables, and other components.A form is divided into blocks; blocks contain the fields, buttons, and other components

What is OAF

OAF Overview

Oracle Application Framework (OAF) is an architecture for creating web based front end pages and J2EE type of applications within the Oracle EBS ERP platform.Oracle Application Framework is the development and deployment platform developed by Oracle to develop the Oracle E-Business Suite “Self-Service” or HTML based Applications.
OA Framework, is based on the industry-standard Model-View-Controller(MVC) design pattern and can be used to develop extensions to existing E-Business Suite functionality. Oracle Application (OA) enables you to personalize the layout of the user interface and the content it displays to suit your business needs. Oracle’s JDeveloper tool with an Oracle Applications extension is used for development for the Oracle Applications Framework and uses Java & XML languages for the same.
Oracle Application Framework (OA Framework or OAF) is a framework developed by Oracle Corporation for application development within the Oracle E-Business Suite (EBS)
Oracle Application Framework (OAF) provides visual and declarative approaches to Java EE development. The OA framework is also available to customers for personalization’s, customizations and custom-application development.
The OA Framework helps to create self Service pages in Oracle EBS.
The OA Framework helps in controlling the flow of the application.
OA Framework works on the basic Java EE principles.
To Learn OAF you must know the Basics of Java like Core Java.
User Interface is Very Interactive in OAF
OA Framework contains inbuilt security
We can view OA Framework pages in mobile phones too which contains Internet browsing feature
OA Framework is J2EE based but it also supports various standards like HTML, XML, SQL, JSP.

Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...