1. OA Framework Introduction

 

Understanding Oracle Application Framework (OAF)

Introduction

Oracle Application Framework (OAF) is Oracle's proprietary technology for building web-based application pages within the Oracle E-Business Suite environment. It provides developers with a structured, Java-based framework for creating interactive and data-driven web applications.


What is OAF?

OAF stands for Oracle Application Framework. It is a Java framework built on the J2EE MVC (Model-View-Controller) architectural pattern. This framework enables developers to create, develop, and deploy web-based application pages that integrate seamlessly with Oracle E-Business Suite.

The three-tier web application architecture of OAF separates concerns into three distinct layers, making development more organized, maintainable, and scalable.


The MVC Architecture in OAF

Model Layer

The Model layer is responsible for handling all business logic and data manipulation. In OAF, this layer is comprised of BC4J (Business Components for Java) components, which include:

ComponentFull NameDescription
EOEntity ObjectEncapsulates business rules associated with a row in a database table
VOView ObjectProvides a way to work with data from Entity Objects or custom SQL queries
AMApplication ModuleContainer that manages access to BC4J model objects
VLView LinkDefines relationships between View Objects
AOAssociation ObjectDefines relationships between Entity Objects

View Layer

The View layer handles the user interface and presentation logic. It determines how data is displayed to the user and how users interact with the application pages.

Controller Layer

The Controller layer manages user interactions and application flow. When a controller is created, a Java class file is generated. This layer is where developers write business logic, implement validations, and control navigation between pages.


Detailed Component Overview

Entity Object (EO)

The Entity Object encapsulates business rules associated with a specific row in a database table. Key characteristics include:

  • Direct Database Link: Entity Objects have a direct relationship with database tables

  • Data Interaction: The application interacts with the database through Entity Objects

  • Business Logic: EO contains validation rules and business logic at the data level

  • Reusability: Multiple View Objects can reference the same Entity Object

Example Use Case: An EO for the EMPLOYEES table would contain validation rules ensuring that salary values are within acceptable ranges and that department IDs reference valid departments.

View Object (VO)

The View Object helps the application work with Entity Objects and retrieve data. Key features include:

  • Flexibility: View Objects can be based on Entity Objects or independent SQL queries

  • Query Capability: VO may execute custom SQL queries with no direct relation to Entity Objects

  • Data Presentation: Provides the data structure needed for display in the user interface

  • Filtering and Sorting: Supports dynamic filtering and sorting of data

Example Use Case: A VO could be created to display employee details joined with department information, even if those tables are represented by separate Entity Objects.

Application Module (AM)

The Application Module serves as a container that provides and manages access to BC4J model objects. Critical points include:

  • Container Role: AM acts as the root container for all model objects on a page

  • Access Control: Provides controlled access to View Objects and Entity Objects

  • Page Control: Has complete control over the application page's functionality

  • Mandatory Component: An OAF page cannot run without an Application Module

  • Object Access: No object on a page can be accessed without going through the AM

Important: The Application Module is essential—without it, no OAF page can function.

Controller (CO)

The Controller responds to user actions and maintains application flow. It consists of two primary blocks:

Process Request

The Process Request block executes when the page loads. Use this block for:

  • Initializing default values when the page first loads

  • Setting up page-level variables

  • Performing initial data validation

  • Preparing data for display

Process Form Request

The Process Form Request block executes when the user performs an action, such as pressing a button. Use this block for:

  • Handling button clicks and form submissions

  • Executing business logic after user input

  • Performing validations on user-entered data

  • Controlling navigation after form submission




How OAF Components Work Together

The following illustrates how the components interact:

  1. User Requests a Page: The user navigates to an OAF page

  2. Controller - Process Request: The controller's Process Request block executes

  3. Model Interaction: The Application Module provides access to View Objects

  4. Data Retrieval: View Objects fetch data from Entity Objects or SQL queries

  5. View Rendering: The View layer renders the page with retrieved data

  6. User Interaction: The user interacts with the page (clicks buttons, submits forms)

  7. Controller - Process Form Request: The Process Form Request block handles the action

  8. Business Logic Execution: The controller executes validation and business logic

  9. Navigation: Based on the outcome, the controller controls navigation











Key Benefits of OAF

BenefitDescription
Structured DevelopmentMVC architecture provides clear separation of concerns
ReusabilityComponents can be reused across multiple pages
IntegrationSeamless integration with Oracle E-Business Suite
ScalabilityJ2EE-based architecture supports enterprise-scale applications
MaintainabilityClear separation of business logic, presentation, and control
Declarative DevelopmentMany features can be implemented without extensive coding

Summary

Oracle Application Framework (OAF) is a powerful Java-based framework for developing web applications within Oracle E-Business Suite. Built on the J2EE MVC pattern, OAF provides a structured approach to application development through:

  • Model Layer: BC4J components (EO, VO, AM, VL, AO) handling business logic and data

  • View Layer: Managing user interface and presentation

  • Controller Layer: Handling user interactions and application flow

The framework's component-based architecture, particularly the Application Module's role as a mandatory container and the Controller's dual-block structure (Process Request and Process Form Request), provides developers with a robust and flexible environment for building enterprise web applications.

Understanding these core concepts is essential for any developer working with Oracle E-Business Suite, as OAF remains the primary technology for creating custom pages and extending standard Oracle Applications functionality.



No comments:

Post a Comment