About Oracle ADF Application Modules

Oracle ADF application modules are business components that represent particular application tasks. The application module provides a data model for the task by aggregating the view object and view link instances required for the task. It also provides services that help the client accomplish the task. For example, an application module can represent and assist with tasks such as:

To define an application module, see Assembling a Data Model.

Data Models

An application module contains view object instances that retrieve the data needed by the client, as well as view link instances that specify the relationships between the view object instances. The view object and view link instances can be represented by a tree, called the application module's data model.

For example, suppose you have the following business component definitions:

You could then define an application module, FindOrdersForCustomerModule, with the following data model:

A three-level tree.

In this data model, AllCustomers is an instance of CustomersView, CustomerOrders is an instance of OrdersView, and CustOrdLink1 is an instance of CustOrdLink. When a particular row of AllCustomers (for example, Customer 101) is selected, CustomerOrders' rowset will be restricted to be the results of the query


That is, only the orders of Customer 101 will be visible through CustomerOrders.

You could also define an application module, ShowOrdersAndCustomersModule, with the following data model:

A two-level tree.

In this data model, AllCustomers is an instance of CustomersView, and AllOrders is an instance of OrdersView. Selections of rows from AllCustomers and AllOrders are independent; all rows from CustomersView and OrdersView are visible at all times.

For more information, see the related topics list.

Application Module Definitions and Application Module Instances

Often, it is important to distinguish between the following:

You create an application module definition using JDeveloper's tools. Then, your client can create an instance of that application module to access data. You can also add an application module instance to another application module definition. This process, called nesting application modules, allows you to reuse small tasks (represented by small application module definitions) as parts of larger tasks (represented by application module definitions containing an instance of the smaller application module). For more information, see the related topics list.

Application Modules and Clients

Because application modules are data model components, you should consider your client's data needs when defining them. Ask yourself the following questions before designing an application module:

This will allow you to design your application module efficiently, without retrieving and storing more data than necessary and without having to programmatically relate data for your client.

Application modules can also contain service methods--methods that perform complex operations on data. These methods can be called from clients, requiring very little data manipulation processing in the client itself. For more information, see the realted topics list.

Application Modules and Transactions

In general, one application module instance owns a single database transaction. All changes made through that instance are made in a single transaction, which can be rolled back or committed at any time.

There are two cases where an application module instance does not own a database transaction:

For more information about working with transactions, see the related topics list.

Application Modules, XML Files, and Java Classes

Like most business components, individual application modules are partially defined by XML files. These files specify the data model and nested application module instances for the application module definition.

If an XML file satisfies your needs for a particular application module, you may not need to extend any classes or write any Java code.

In addition to XML files, application modules are optionally defined by a Java class, the application module class. This class includes any service methods or extended code required by the application module.

About Business Components
About Oracle ADF Business Domain Components, Data Model Components, and Organizational Components
About View Objects
About View Links
About View Object and View Link Instances
Adding View Object Instances to the Data Model
Nesting Application Modules
Accessing Data from Clients
About Business Components Service Methods
Managing Transactions
About Bean-Managed and Container-Managed Transactions




Copyright © 1997, 2004, Oracle. All rights reserved.