:::: MENU ::::
Browsing posts in: adf

Which BS Technology Should I Use in Oracle ADF?

There is no single answer to the question of which business services technology is the best. The right choice of a business services technology depends on your needs, your background, and your priorities.

Do You Have Your Own Object Framework?
OracleAS TopLink POJO can provide O/R mappings and caching for arbitrary Java objects. For this reason, OracleAS TopLink is generally the best alternative for developers and organizations who have a Java object framework in place or who wish to create one. If you have your own systems or requirements for representing business objects, implementing business logic, and shaping and aggregating the data for clients, TopLink POJO is most likely the best option for your projects. EJB technology requires that your components match EJB specifications, and ADF BC component classes must extend ADF BC framework classes, but TopLink will work with any object model to provide O/R mapping, data retrieval and caching, and transaction functionality.

Do You Want to Use an Existing Object Framework?
If you are creating a completely new application, with no existing application infrastructure, Oracle ADF Business Components technology is the most productive option you can choose. ADF Business Components technology handles all aspects of application plumbing completely automatically: O/R mapping, data retrieval and caching, transaction management, and integration with the ADF data binding layer. In addition, ADF Business Components automatically implements key J2EE design patterns to improve performance and scalability; it provides a framework for creating validation rules and other business logic; and it includes base classes to represent your entities and views.

Can You Use Oracle Runtime Technology?
Oracle ADF Business Components and OracleAS TopLink are both 100% J2EE-compliant technologies that will run on any J2EE-compliant application server. Neither of these technologies requires you to use an Oracle database or application server, nor do they in any way restrict which technologies you can use for the view or controller layer of your application. Both of these technologies, however, make use of some Oracle runtime classes on the application server. If you use ADF Business Components, your business services will extend the ADF Business Components base classes. If you use OracleAS TopLink, your business services will rely on the TopLink runtime to provide O/R mappings and caching. If you have requirements that prevent you from using any Oracle classes at runtime, you will need to choose a different business service technology: either EJB with CMP provided by the application server, or entirely hand-coded JavaBeans-based business services.

Oracle ADF Further Raises the Level of Declarative Development for JSF

The Oracle ADF Model layer follows the same declarative patterns as other J2EE technologies, by using XML configuration files to drive generic framework facilities. The only interesting difference is that ADF Model focuses on adding value in the data binding layer. It implements the two concepts in JSR-227 that enable decoupling the user interface technology from the business service implementation: data controls and declarative bindings.

Data controls abstract the implementation technology of a business service by using standard metadata interfaces to describe its public interface. This includes information about the properties, methods, and types involved. At design time, visual tools leverage the service metadata to let you bind your UI components declaratively to any public member of a data control. At runtime, the generic Oracle ADF Model layer reads the information describing your data controls and bindings from appropriate XML files and implements the two-way “wiring” that connects your user interface to your service. This combination enables three key benefits:

  •  You write less code, so there are fewer lines to test and debug.
  • You work the same way with any UI and business service technologies.
  • You gain useful runtime features that you don’t have to code yourself.


There are three basic kinds of binding objects that automate the key aspects of data binding that all enterprise applications require:

  • Action bindings invoke business service methods to perform a task or retrieve data.
  • Iterator bindings keep track of the current row in a data collection.
  • Attribute bindings connect UI components to attributes in a data collection.


Typically UI components like hyperlinks or buttons use action bindings. This allows the user to click on the component to invoke a business service without code. UI components that display data use attribute bindings. Iterator bindings simplify building user interfaces that allow scrolling and paging through collections of data and drilling-down from summary to detail information.

The group of bindings supporting the UI components on a page are described in a page-specific XML file called the page definition file. Generic bean factories provided by ADF Model use this file at runtime to instantiate the page’s bindings. These bindings are held in a request-scoped Map called the binding container accessible during each page request using the EL expression #{bindings}. This expression always evaluates to the binding container for the current page. Figure 1–3 shows how EL value binding expressions relate the UI components in a page to the binding objects in the binding container.



Oracle ADF Business Components

  1. Oracle ADF Business Components: declaratively-configured, reusable components for working with relational databases.
    • Five types of components:
      1. Entity Object – Java class that represents a DB Table.
      2. Entity Association – It represents a relation between DB tables. Normally there are one association for every foreign key relationship between tables in your DB.
      3. View Object – It represents the datasets you need for a specific purpose. You can think of it as a representation of a SQL Select statement you would write to get the data you need. Just like a SELECT statement can join data from multiple tables, a view object can join data from multiple entity objects. (It can be updatable). It can have View Criteria that represent various filters on the data in the VO (View Objects).
      4. View Link – It represents master-detail relationships between VO (View Objects). VL will typically be based on entity associations (again based on FK [foreign keys in the DB]), but you can create any view link  you like to link two VO. When VO are connected with a VL, the ADF will automatically handle the master-details coordination. When you change to another master record, the detail view object will automatically be refreshed with details for the new master.
      5. Application Module – It is a business service that coordinates a number of VO instances. It is exposed to the UI as a Data Control. The AM (application module) handles the DB transactions and offers methods to commit and rollback changes into the DB across VO.


Desperate ADF

Oracle ADF, the free version, called ADF Essentials, includes:

  1. Oracle ADF Faces: A set of more than 150 web user interface (UI) components based on JavaServer Faces (JSF).
  2. Oracle ADF Controller: An extension of the JSF controller layer that helps build reusable process flows, and includes capabilities to create dynamic regions with changing content in web pages.
  3. Oracle ADF Binding: An XML-based, meta-data abstraction layer for connecting UI components to business services.
  4. Oracle ADF Business Components: declaratively-configured, reusable components for working with relational databases.

Similarities of JEE and Oracle ADF

ADF is built on top of the Java and Java EE stack. If you are familiar with Java EE, this topic is for you. Let us take a quick look at the basic building blocks of these two technologies to see what they have in common: