Oracle ADF Faces Cookbook
上QQ阅读APP看书,第一时间看更新

Introduction

In today's environment, enterprise applications have become more and more complex; they need the underlying technology to be scalable, distributed, component based, and mission critical.

Designing and developing such enterprise applications means going through hundreds of requirements; failure to meet any of these requirements can lead to the failure of the whole project. However, Oracle ADF comes to the rescue. Oracle ADF is a Java EE framework that inherits Java EE security, robustness, and scalability.

It also adheres to the rapid application development principles in today's agile world. These principles provide the developer with a rich out-of-the-box functionality to focus and give his/her 100 percent to the business logic.

Oracle ADF is an end-to-end framework that follows the Model View Controller (MVC) pattern as illustrated in the following diagram:

Introduction

Oracle ADF offerings vary between mobile solutions with Oracle ADF Mobile and the Desktop Integration solution, which can be integrated with Microsoft Office Excel with Oracle ADF Desktop Integration. It also provides a free offering through which developers can download, develop, and deploy enterprise applications with Oracle ADF Essentials for free. Additionally, they are all evolved from the core Oracle ADF framework, which is the Java EE framework where they extend beyond MVC and integrate with other Oracle middleware solutions.

Tip

To know more about what Oracle ADF has to offer, check its main page on Oracle, http://www.oracle.com/technetwork/developer-tools/adf/overview/index.html.

In this book, we will only focus on ADF Faces and ADF Controller of the Oracle ADF framework. To make things easier, we will call them Oracle ADF Faces. Although Oracle ADF Faces exists in both the commercial Oracle ADF and Oracle ADF Essentials (the free version), we will only focus on the commercial part of it in this book since we are discussing the latest version of the Oracle ADF framework.

Tip

The latest version of Oracle ADF Essentials is 11.1.2.4, but this book focuses on Oracle ADF 12c. To know more about Oracle ADF Essentials, check the official page at http://www.oracle.com/technetwork/developer-tools/adf/overview/adfessentials-1719844.html.

Oracle ADF Faces is built on top of the JavaServer Faces (JSF) framework, which is the standard Java EE framework implementation. Being built on top of the JSF framework makes Oracle ADF a component-based framework just like JSF.

JSF uses XML files called View templates as its view layer and a FacesServlet that acts as a controller in which it processes requests, loads the appropriate View template, builds a component tree, processes events, and renders the response (typically in the HTML language) to the client. Check the following diagram for more information about the JSF lifecycle:

Introduction

The state of UI components and other objects' of scope interest is saved at the end of each request in a process called state saving, which can be saved either on the client side or on the server side (more on this in Chapter 10, Scaling Your Application) and restored upon the next creation of that view.

Oracle ADF Faces extends all that we've discussed so far and adds the following to JSF:

  • It adds more than 100 additional components that support Ajax
  • It enhances the JSF lifecycle by adding ADF-specific phases that add support for task flows, more scope definitions, and the ADF Binding layer

In this chapter, we will take our first steps toward creating our first ADF application; in this application, we will start from scratch and even build the Business Service Layer quickly (this book doesn't focus on the Business Service Layer, but since it's the first step, it'll be included in this chapter).

In order to complete the recipes in this chapter, you need to have the HR schema in your database unlocked and up and running.

If you are a skilled ADF developer, you can skip this chapter.