Building Oracle ADF Applications: Hands-on Guide

Building Oracle ADF Applications: Hands-on Guide


The Oracle Application Development Framework (ADF) is a mature J2EE application development framework, well supported by Oracle JDeveloper. By using ADF, a developer can minimize the coding effort to build an application’s infrastructure and will be able to concentrate more on implementing the complex business logic of the application. In this article I will discuss the Oracle ADF application development process.


Oracle ADF is based on the Model View Controller design pattern. It offers an integrated solution that captures all the layers of the MVC architecture. Oracle ADF allows a developer to create user interfaces by empoloying the drag and drop mechanism. This has two benefits:

  • Faster development
  • The developer can concentrate in implementing the complex business logic.

Oracle ADF work flow components

As mentioned above, Oracle follows the Model View Controller (MVC) design pattern. As you probably know, an MVC application is separated into:

  • A model layer that is used to handle the interaction with different data-sources and executes the business logic.
  • A view layer that handles the user interface of the application.
  • A controller that act as manager to manage the application flow and acts as an interface between the model layer and the view layer.

Implementing these layers eases the maintenance of the application and reuse of components across applications. This separation of one layer from others results in a loosely coupled, Service Oriented Architecture or SOA.

Oracle ADF not only implements the MVC design pattern but it also separates the model layer from the business services to enable service oriented development of applications. Oracle ADF architecture is based on following four layers:

  • Business Service Layer – This layer provides access to data from different sources and also contains the business logic
  • Model layer – This layer provides an abstraction on top of the business service layer. Thus this layer enables the view and the controller layers to respond to different implementations of business services in a uniform way.
  • Controller layer – This layer controls the flow of the application.
  • View Layer – This provides the user interface of the application.

Figure 1: Oracle ADF works flow.

Using JDeveloper

We will now see how to develop a sample application using JDeveloper 12c (Version on a Windows platform. This software can be downloaded from The software comes in to form of a single executable binary file. Installation on Wndows 7 should be carried out as an administrator. Once installed, JDeveloper can be started by selecting Start > All Programs > Oracle > Oracle Home > Oracle JDeveloper Studio > Oracle JDeveloper Studio. Select the role ‘Studio Developer (All Features)’ and then hit the ‘Ok’ button. Click on the ‘New Application’ as shown:

Figure 2: Creating new application The following screen should come out:

Figure 3: Showing option selection

Now we have a process of six steps as shown below:

Step 1: Provide the application name

Step 2: Provide the project name for the model

Step 3: Specify the following java settings for the model project

  • Default Package
  • Source path
  • Output directory

Step 4: Provide the project name for the view controller

Step 5: Specify the following java settings for the model project

  • Default Package
  • Source path
  • Output directory

Step 6: Specify the build tool. You can have your own ant or maven script but it is advised to use the default JDeveloper build tool.

Now click on the ‘Finish’ button:

Once the project is created successfully, we get the following screen:

As we see here, we get following two projects created:

  • ModelPrj
  • ViewControllerPrj

Now to start with, let us consider an example of a simple application where we have two tables: MEMBER and CATEGORY_MASTER. The SQL to create these two tables are as under:


As we see here the table CATEGORY_MASTER is used as a master table to store the different categories of the members and the table MEMBER stores the information about the members.

Now let’s build the persistence model for member and category master using Enterprise Java Beans 3.0 standard entity beans. In the Application window, right-click on the project ModelPrj. Select New and then From Gallery. The screen shot is shown below.

The following screen should appear:

Click on Business Tier > EJB > Entities from Tables

Now click on Ok. The following screen should appear:

Select JPA 2.0 and then click on Next. The next screen mentions the persistence unit. Click on Next on this screen. This screen asks for the credentials to connect to the database. Provide the necessary data on this screen and hit the Ok button. You can also test your connection first and then finally connect to it. Once connected, the next screen shows the database connection parameters. Select your tables from the database and then click on the Next button. The following screen should appear:

Keep clicking the Next button until you get the following screen:

Click on ‘Finish’ button on this screen. The following screen should appear after successful completion.

Once this is done lets create the EJB diagram using: Right click on ModelPrj > Select New > From Gallery > EJB Diagram (JPA/EPA 3.x).

In the component window select EJB Component and open the EJB Nodes > Session bean. Create a session bean with name – MemberEJB. Provide the relevant details and click on the Finish button on the following screen:

The application window and the diagram should look like the following.

Now create the EJB data control. This is a five step process. Keep clicking on the Next until you get the Finish button. Click on the ‘Finish’ button. The data control gets created. Once created, the following screen should appear:

Right click on the DataControls > memberEntityFindAll > Provide the UI Hints and the Validation rules Now create the ViewController Project. Right click on the ViewControllerPrj > New > From Gallery > Webtier > Jsf facets. Select Page as item and then click on Ok. Provide the file name as member.jsf.

On the next screen select the layout of your choice as under and then hit ‘OK’ button.

Once you specify the input fields and provide the mapping with the EJB your application is ready to use.


This article has concentrated more on the practical part of Oracle ADF application development. Oracle ADF is a very good tool for a Java developer who wants rapid development of an application that can be easily integrated with an Oracle database. The ease of UI development allows the developer to focus primarily on the business logic.


About the Author

Kaushik Pal is a technical architect with 15 years of experience in enterprise application and product development. He has expertise in web technologies, architecture/design, java/j2ee, Open source and big data technologies. You can find more of his work at and you can email him here.

Share the Post:
XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes

ransomware cyber attack

Why Is Ransomware Such a Major Threat?

One of the most significant cyber threats faced by modern organizations is a ransomware attack. Ransomware attacks have grown in both sophistication and frequency over the past few years, forcing

data dictionary

Tools You Need to Make a Data Dictionary

Data dictionaries are crucial for organizations of all sizes that deal with large amounts of data. they are centralized repositories of all the data in organizations, including metadata such as