1 Introduction to ADF Mobile

This chapter introduces ADF Mobile—an application development framework within Oracle JDeveloper that enables you to create multi-featured applications for iOS and Android-powered devices. The applications run natively on mobile devices.

This chapter includes the following sections:

1.1 Introduction to ADF Mobile

ADF Mobile enables you to create an application that can house different types of content that run on mobile devices powered by the iOS and Android platforms. Within the framework of the application, the contained functional areas are referred to as application features and represent one or more specific pieces of the application's functionality.

Although each ADF Mobile application feature may have its own set of user-defined preferences, ADF Mobile enables you to apply a uniform style of user preferences to each of the application features embedded into the ADF Mobile application. Further, you can improve the end-user experience by grouping these mobile application features by functionality. For example, you can group a mobile application feature that provides customer contacts together with one for product inventory into the same ADF Mobile application. You can also control the display of the application features by such criteria as user role or device version.

From the end-user perspective, an application built using ADF Mobile is launched by clicking its application icon on the mobile device (see Figure 1-1).

Figure 1-1 Launching ADF Mobile Application

Launching ADF Mobile Application

After the ADF Mobile application opens, the end user clicks an icon for an application feature. The application features can display as icons on a navigation bar (see the bottom portion of Figure 1-2) or in a page format with larger icons in a homescreen page, commonly referred to as a springboard (see Figure 1-3).

Figure 1-2 Application Features Displayed on Navigation Bar

Application Features Displayed on Navigation Bar

Figure 1-3 Application Features Displayed on Springboard

Application Features Displayed on Springboard

Because ADF Mobile supports integration of these application features with the mobile device services, the end user can, for example, place a call from the mobile device by clicking a name listed in the contacts for an application feature for a mobile field service report form or scan a receipt to update a mobile expense report. For more information on ADF Mobile user experience, see Appendix C, "ADF Mobile Application Usage."

The following types of application features can coexist within the same ADF Mobile application:

  • ADF Mobile AMX—although you do not necessarily have to develop the application features that reside within the ADF Mobile application, this implementation approach allows you to define an application feature which utilizes much of the device's functionality through embedded components, with the metadata represented by an XML file. This application feature implementation, which is generated into HTML or JavaScript on a mobile device and which uses ADF data bindings, is developed declaratively in JDeveloper using a set of ADF Mobile-specific components.

    The workflows of ADF Mobile AMX pages are portable across platforms.

    For more information, see the following:

  • Local HTML—this implementation approach allows you to employ an HTML file that might embed existing technologies, such as JavaScript and Java. You can use JDeveloper to implement an ADF Mobile application feature as a local HTML. For more information, see Section 5.9.1, "How to Define the Application Content."

  • Remote URL (also known as server HTML)—this implementation approach allows you to point to a resource on the web by specifying a URL endpoint. You can use JDeveloper to implement an ADF Mobile application feature as a remote URL.

    The URL endpoints are portable across platforms.

    For more information, see the following:.

An ADF Mobile application enables the integration of its embedded application features with such native device services as phone, camera, GPS, and so on. These services can be accessed from the local HTML, ADF Mobile AMX, Java, and remote web applications.

1.2 ADF Mobile Runtime Architecture

An extension of the PhoneGap framework (see http://www.phonegap.com/home), the ADF Mobile architecture enables HTML5, as well as ADF-defined pages and task flows to be rendered in the same downloadable application.

ADF Mobile consists of the following parts:

  • Model provided by Oracle ADF.


    The model layer provides the facility to connect to a local database.

  • View expressed as HTML or XML.

  • Controller defined with XML.

  • Java runtime powered by an embedded Java VM bundled with each application.


ADF Mobile's model-view-controller stack resides on a mobile device and represents reimplementation of ADF's model-view-controller layers. UI metadata is rendered to native components on device and is bound to the model through the ADF Model.

Figure 1-4 shows the overall runtime architecture of ADF Mobile.

Figure 1-4 ADF Mobile RunTime Architecture

Run-Time Architecture of ADF Mobile

As shown in Figure 1-4, the following elements comprise the ADF Mobile runtime architecture:

  • Device-Native Container represents an application container, or template, compiled as a device-native application binary. This container provides the runtime environment for an ADF Mobile application to run as an on-device, native application in the mobile device's operating system (for example, iOS). Besides hosting the client-side components for an ADF Mobile application, it provides navigation utilities, such as a springboard and navigation bar, which enable access to particular application features.

  • Web View is a part of the device native container that uses a mobile device's web engine to display and process web-based content. In an ADF Mobile application, the web view is the primary mechanism to render and deliver the application user interface.

  • Server HTML represents a web-based user interface that is generated on the server and delivered as a web page to the ADF Mobile application. The application HTML code, business logic, and page flow logic are generated on a remote server. Server HTML can access device native services, such as camera, through the JavaScript API supported by PhoneGap, as long as it is running inside an ADF Mobile application. Common options for server HTML-based pages are ADF Mobile browser and Oracle ADF Faces rich client-based pages. For more information, see Chapter 12, "Implementing Application Features as Remote URLs."

  • Local HTML represents web pages developed using JDeveloper or third-party tools that are directly embedded within an ADF Mobile application. These pages are delivered as a part of the ADF Mobile application. Local HTML files can access device native features through the JavaScript APIs supported by PhoneGap.

  • ADF Mobile AMX Views are based on the ADF Mobile AMX technology that delivers a JSF-like development experience to working with an HTML5-based user interface. ADF Mobile AMX views are defined using UI and code editors provided by JDeveloper. These views are embedded into an ADF Mobile application and deployed to a mobile device. At run time, the JavaScript engine in the web view renders ADF Mobile AMX view definitions into HTML5 components. Of the implementation approaches provided by ADF Mobile, application features developed using the ADF Mobile AMX components provide the most authentic device-native user experience through their extensive support of animation and gestures. For more information, see Part IV, "Creating ADF Mobile AMX Application Features".

  • ADF Controller is represented by a mobile version of Oracle ADF controller that supports a subset of Oracle ADF task flow components available to a server-based Oracle ADF application. Both bounded and unbounded Oracle ADF task flows are supported, as well as a subset of events and scopes that are supported by the server-based ADF. For more information, see Section 7.2, "Creating Task Flows."

  • Java provides a Java runtime environment for an ADF Mobile application. This Java Virtual Machine (JVM) is implemented in device-native code, and is embedded (or compiled) into each instance of the ADF Mobile application as part of the native application binary. The JVM is based on the JavaME Connected Device Configuration (CDC) specification.

  • Managed Beans are Java classes that can be created to extend the capabilities of ADF Mobile, such as provide additional business logic for processing data returned from the server. Managed beans are executed by the embedded Java support, and therefore must conform to the JavaME CDC specifications. For more information, see Chapter 9, "Using Bindings and Creating Data Controls."

  • ADF Model in an ADF Mobile application supports a subset of business logic components available to a server-based Oracle ADF application. ADF model contains the binding layer that provides an interface between the business logic components and user interface, as well as the execution logic to invoke REST or SOAP-based web services. For more information, see Chapter 9, "Using Bindings and Creating Data Controls."

  • Application Configuration refers to services that allow key application configurations to be downloaded and refreshed. For example, URL endpoints for a web service or remote URL connection. Application configuration services download the configuration information from a WebDav-based server-side service. For more information, see Section 10.7, "Administering Web Services."

  • Credential Management and Access Control refers to client-side services that provide security-related services for an ADF Mobile application. For example, a local credential store that securely caches user credentials to support an offline authentication or access control services that display or hide application features based on user access privileges. For more information, see Chapter 17, "ADF Mobile Application Security."

  • PhoneGap is an open-source code library that provides a common JavaScript API to access various mobile device services, such as the camera. PhoneGap provides a majority of the device services integration for an ADF Mobile application. PhoneGap JavaScript APIs are further abstracted as device data controls in the JDeveloper design time for ADF Mobile AMX-based views, allowing for integration of device services by simply dragging and dropping data controls to their ADF Mobile AMX views.

  • Local Data refers to data stores that reside on the device. In ADF Mobile, these are implemented as encrypted SQLite databases. Create Retrieve Update Delete (CRUD) operations are supported to this local data store through the Java layer, using JDBC-based APIs. For more information, see Chapter 11, "Using the Local Database."

  • On the server side, the Configuration Server refers to a WebDav-based server that hosts configuration files used by the application configuration services. The configuration server is delivered as a reference implementation. Any common WebDav services hosted on a common J2EE server can be used for this purpose. For more information, see Section 10.7, "Administering Web Services."

  • On the server side, the ADF Mobile Browser refers to a framework for developing server-side applications that can be used for implementation of the remote URL ADF Mobile application feature. For more information, see Chapter 12, "Implementing Application Features as Remote URLs."