Friday 4 July 2014

OAF Introduction

Drawbacks of form
In form we can’t create the html kind of pages that’s why forms cant be opened using browser.
There are some other frameworks like OAF
i) AK Framework: - AK means one type of common module. It uses one responsibility called AK Developer. In AK Developer we will create items and buttons and we will write the code using java.
ii) JTF Framework:- Java technology framework mainly developed CRM Products in JTF
iii) OAF: - It has a tool (wizard) tightly integrate the oracle applications and it can’t connect to other database only oracle applications as the source.
iv) ADF: - Application development framework and it is developed to implement fusion. The fusion pages are created in ADF and fusion is combination of people soft, Siebel and jd Edwards etc.
OAF
1) We can design self service web based applications those can be run through the internet browser, which cant be developed using forms
2) In Self service web based applications form is called as page
3) Look and feel is good compared to forms
4) Less coding effort
5) Performance is high
6) Light weight components
7) Security
8) Follow java concepts
Oracle Application Framework (OA Framework) is the Oracle Applications development and deployment platform for HTML-based business applications. OA Framework consists of a set of middle-tier runtime services and a design-time extension to Oracle9i JDeveloper called Oracle Applications Extension (OA Extension).
During the first few years after the Internet evolution, the software industry witnessed an influx of rapidly changing technologies. These technologies matured, yet there are still a myriad of low-level and complex technologies that are hard to learn and implement. Under these circumstances, OA Framework has emerged as an integrated platform for developing and deploying Oracle E-Business Suite HTML-based applications,
leveraging technological advances without taking on associated complexity. Since its inception, OA Framework embraces the following principles:
�� End User Productivity
The shift from client-server to multi-tier deployments comes with many cost savings, but not without compromise. HTML-based applications started out very much like old mainframe terminals; actions on the client side resulted in a round trip to the middle tier.
Over time, user interface interactivity improved. OA Framework has always kept user interface interactivity a top priority with features such as partial page rendering (PPR), hot keys, smart choice lists and auto-completion of fields with lists of values. In addition, Oracle focuses a wealth of resources and expertise on user behavior and psychology, to develop a set of user interface layout and interaction standards, commonly known as the BLAF (Browser-Look-And-Feel) guidelines. BLAF is the default look and feel that all OA Framework applications assume, but can be personalized in many ways to meet customer branding and style requirements. OA Framework's implementation of
BLAF standards yields a consistent user experience and further enhances user productivity.
�� Enterprise-Grade Performance and Scalability
OA Framework has aggressive performance and scalability targets. Most Oracle E-Business Suite application pages have sub-second response times to most user interactions. It takes a bit longer the first time a page is accessed within the same Java Virtual Machine, but thereafter, most of the commonly needed information (such as user information) is cached in the middle tier, allowing faster response. Resources are conserved through a number of resource pooling mechanisms and the
swapping of idle resource data between memory and database.
�� Developer Productivity
OA Framework is designed around the simple Model-View-Controller (MVC) architecture. To shield application developers from costs associated with the rapidly changing technological landscape, Oracle has adopted a declarative flavor of the MVC architecture. Key building blocks of an application are defined in a descriptive manner using a simple JDeveloper user interface and then saved in an industry standard XML format. With OA Framework Release 11.5.10, Oracle is extending access and
benefits of the OA Framework development environment to all Oracle E-Business Suite customers and partners. Customers and partners can leverage the proven OA Framework technology to add extensions to their Oracle E-Business Suite applications.
�� Application Customizability
Oracle is able to exploit its twenty plus years of experience in building and deploying business applications, to architect OA Framework with durable and economical customizations. Oracle has kept that goal in focus and produced a very compelling solution with plenty of flexibility to tailor the user interface (look-and-feel) and business logic. Thanks to the declarative and object oriented nature of OA Framework, application personalization and extensibility is readily available at a fraction of the industry startup cost and at a very minimal maintenance cost, if any.
�� Open Standards
Oracle continues to be a champion of industry standards and an active participant in the development of several emerging standards. OA Framework technologies has driven several industry standards and has adopted several others as they were published. Several Oracle technology architects are active members on a number of standards drafting committees. OA Framework is J2EE based and features several industry standards such as XML, HTML, Java, JSP, SQL and Web Services.
OAF Architecture:-
OAF Follows J2EE architecture – MVC Architecture
Model – View – Controller
View is nothing but the output layout design of the page
Controller is a java file; we can capture events and actions of a page and directs the application flow.
For a page we can attach one controller and it executes from controller only
We can’t touch database using controller, we can touch only user interface and by using model we will touch the data base and model cant touch the page.
We need to have model using this only we can perform database operations
Model is nothing but a collection of BC4J Components or objects
Model:-
1) Entity Object
2) View Object
3) Application Module
4) Associations
5) View link
Entity object: - If we want to perform DML operations then only we will create entity object with out this we cant perform DML Operations
For any page we will get only one class file and to open java file and to decompile the page oracle/apps/fnd/framework/schema/server
In the above path OAEntityImpl can be found
If there is 100 attributes, then u will get 100 get and set methods.
Protected void validate entity method is used to throw the messages for any validations among the attributes.
These methods will not called from any where and the framework automatically calls when ever the data is committed or saved.
View Object :- It is nothing but the select statement using the view object. We can perform DML operations on the top of entity object. We need to create view object for all the data base operations. To retrieve we need a entity object.
It can be created in 2 ways.
i) Based on EO
ii) Individual VO
Transient Attributes:- we can not save it and show it only for calculation purpose and it is not part of the query.
For example when EMPVO is created
XML File created – EMPVO.xml
2 java files created – EMPVOimpl.java and EMPVO Rowimpl.java
XML File :- it consists of query and if u open the EMPVO.xml you can find out the query and what are the transient attributes involved if there is any.
XML File consists of query column and transient attributes. But in query column we can see only query.
The only purpose is to find out the query.
EMPVOImpl.java – The java file is created like the
Public class Empvoimpl extends OAViewObjectImpl
{
}
(Standard file) and it is found in the below path – oracle/apps/fnd/framework/server
The main purpose is to modify the query at runtime and execution can also be done in class file.
This is the base class file, what ever operations related to query like adding where conditions and passing can be done using this class file.
EmpvoRowImpl.java:- It is like a cursor and used to catch the particular record or row by row
When ever you want the transactions record by record use this RowImpl file
Public class EmpvorowImpl extends OAviewobjectRowimpl
{
}
Application Module:-
It is heart of component with out this we can’t do anything, it creates new data base session for each and every run. With out the data base session we can’t run the page. We can perform business validation and logic in application module. It access view objects
(Access all related model BC4J objects. Am mandatory for every page)
When you create Am with name Sample AM it creates 2 files
i) Xml Files – SampleAm.xml
ii) Java File – SampleAmimpl.java
XML file – It is not used -- To see ODBC package structure
We don’t use XML file but to run and create the session we will use XML File.
Java file – it is heart of AM
When ever you create VO and if u wants to access that VO then we need to attach this VO to AM. Then java files create methods for each and every VO which is attached to Am and along with that we can create our own methods also.
Public class SampleAmImpl extends OAApplicationmoduleImpl
{
}
Every thing written inside is case sensitive.
Associations:-
It is a join between entity objects (To delete a record which has master detail relation ship using association we can delete)
It create only XML File
View Link:-
It is the join between View objects and the purpose is to extend the Master table and it creates only XML File.
Controller:-
It is a java file and we have to create a controller for each and every page and to perform actions related to page we can attach any controller at run time .
Controller can’t interact with data base. It can perform actions related to page means it can’t perform DML Operations
Through model controller can interact with the data base and model can not interact with page.
Public class Empco Extends OAControllerImpl
{
Public void process request()
{
}
n This method executes while the page is loading and this method never be called once the page is loaded
n To get some default values
n Oracle/apps/fnd/framework/webui – web userinterface
Public void processformrequest()
{
}
n This method is used to execute after the page is loaded
Public void xyz ()
{
}
Both are interface, class can be extended where as interface can not.
The MDS document details loaded into data base in the JDR tables
If we want to write any code we need to write it in default methods
If we write in custom method, that method must be called on the any of the standard methods.
These 2 methods consists 2 parameters
n OAPageContext pageContext
n OAWebBean webBean
Using the page Context we can access the items like item values
All page items we want to display called as webBean only
OAWebBean : 4 types
1) OAMessagetextInput
2) OAMessageCheckboxBean
3) OASubmitbuttonBean
4) OAMessageRadioButtonBean
OAMessageTextInput x=webBean.findChildRecursive (“Requestor”);
Find Child recursive is a method which returns value in webBean
Syntax: webBean.findChildRecursive (itemid)
n This method returns value as webBean to convert this into text input and use type casting.
OAMessageTextInput x= (OAMessagetextInput Bean)
webBean.findchildrecursive (“requestor”);
The other method which is created in controller is ProcessFormdata () and it calls for execution of the page and it is not visible and it will maintained by the framework
When u will click on button 1st it will call processformdata and next processformrequest and this is order of execution.
Process request – processformdata – processformrequest ()

1 comment:

  1. Hello Raja,

    Sorry to bother you.
    I could able to resolve the number formula issue, but i have to format these numbers.
    i.e. say
    the data is as below
    emp salary
    -----------------------
    abc 10000
    efg 20000
    xyz 30000

    this i could able to display, but i need to display as below

    emp salary
    -----------------------
    abc 10,000.00
    efg 20,000.00
    xyz 30,000.00

    i had a page with the data in advanced table region with a view object EmpVO and VO column names as emp and salary and advance table column id's as empName and sal.
    and the salary is of oracle.jbo.domain.Number type (not int/float/double...).

    I apologize if I am asking too much.

    Thanks in advance,
    Rhea.

    ReplyDelete