This chapter includes the following sections:
The Oracle Mobile Application Framework (MAF) extension in OEPE provides a number of editors and wizards to facilitate the development, testing, and deployment of MAF applications. Using these wizards, you can create a MAF application, define one or more application features, add content to an application feature, and deploy the MAF application to a test environment or device in a relatively short amount of time.
Figure 2-1 shows the WorkBetter sample application in OEPE's MAF Application Editor where a number of the items that you use to develop MAF applications are identified:
The MAF Application Editor (invoked from the assembly project), used to specify the MAF application's name, the default navigation menus (navigation bar or springboard) that the application renders, security, and device access options for the application.
The MAF Features Editor (invoked from the view project), where you define the application features that your MAF application contains.
By default, OEPE creates a MAF application with two data controls, one in the application project application
Application
and one in the view project application
View
. These data controls expose operations that you can drag to a MAF AMX page where OEPE displays context menus to complete configuration of the operation when you drop it on the page. For example, dragging the hideNavigationBar()
operation to a page prompts OEPE to display a context menu where you configure a control for end users to hide an application's navigation bar.
The WorkBetter sample application is one of a number of sample applications that MAF provides to demonstrate how to create mobile applications using MAF. For more information, see MAF Sample Applications.
OEPE proposes default options in the wizards so that you can create a MAF application with one application feature displaying one MAF AMX page as follows:
Create a MAF application, as described in Creating a MAF Application.
Define an application feature for the MAF application and add content, as described in Defining Application Features for a MAF Application.
Add content to the application feature, as described in Adding Content to an Application Feature.
Figure 2-1 MAF Application Editor
OEPE's MAF Feature Editor and MAF Application Editor are the primary tools you use to interact with a MAF application while you are creating it. These two editors interact with each other, and with the files that comprise the application you are developing, in a way that can affect your choices while editing.
As shown in Figure 2-1, the MAF Application Editor is located in the Project Explorer under the application and MAF node. It edits the maf-application.xml
file.
The MAF Feature Editor is located in Explorer under the view project and MAF node. It edits the maf-feature.xml
file.
The MAF Application Editor enables you to configure the maf-application.xml
file to set the basic configuration of the mobile application by designating its display name, a unique application ID (to prevent naming collisions) and also by selecting the application features that will display on the application springboard (the equivalent of a home page on a smartphone). Further, this editor enables you to create the user preferences pages for the mobile application. The editor is described in Creating a MAF Application,.
Figure 2-2 Application Features Displaying in the Mobile Application's Springboard
You can modify these elements declaratively using the MAF Application Editor, shown in Figure 2-3, or manually using the XML Editor or the Source editor. You can use these approaches interchangeably.
Figure 2-3 The MAF Application Editor for the maf-application.xml File
The MAF Feature Editor enables you to add features to your application. You create the features with this editor, and specify the characteristics (ID, name, description, vendor information, version, lifecycle event listener, security, and images for navigation and for the springboard) through the editor.
In Eclipse, a perspective is a collection of views arranged in a specific layout that is suitable for a type of development. MAF has its own perspective which you should use when you are developing MAF applications. It gives you access to menu and toolbar options that we describe elsewhere in this manual.
To change to the Oracle MAF perspective:
You create a MAF application using the creation wizards in OEPE.
You create a MAF application in OEPE using the application creation wizard.
To create a MAF application:
OEPE creates a MAF application with three projects and two data controls (for application features and device features), as shown in Figure 2-4. It also creates files that you use to configure your MAF application and files that your MAF application needs when you deploy it to the Android and/or iOS platform(s).
For more information about the files and artifacts that OEPE generates when you create a MAF application, see MAF Application and Project Files..
Figure 2-4 Generated MAF Application Artifacts
Note:
If you have the Error Log open when you create a MAF application you will see messages similar to:
org.eclipse.core.runtime.CoreException: Illegal install location D:\p4\depots\OEPE\tools-eclipse\annex\maf-2.1\install for vmInstall oracle.eclipse.tools.maf.JVMCDCv201 contributed by oracle.eclipse.tools.maf.dt.v201: Associated MAF runtime is not installed.
There will be one entry for each release of MAF with OEPE. You can safely ignore them.
A MAF application must have at least one application feature. The WorkBetter sample application, for example, includes four application features (Dashboard, People, Organizations, and Springboard). Figure 2-5 shows three of these application features displaying in that application's custom springboard.
Figure 2-5 Application Features in the WorkBetter Application's Springboard
One of the tasks to do after you define an application feature is to add content to the application feature. In the Outline section of the editor, expand the new node for the feature and click the Add icon. Choose the type of new feature and complete the information required:
MAF AMX Page: Choose this content type if you want the application feature to render MAF AMX pages.
MAF Task Flow: Choose this content type if you want the application feature to render a collection of activities that make up a task flow. Examples of activities that you can include in a task flow are views (to display MAF AMX pages), method calls (to invoke managed bean methods), and task flow calls (to call other task flows).
Local HTML: Choose if you want the application feature to render HTML page.
Remote URL: Choose if you want the application feature to render content from a remote URL.
The general steps to add a content type to an application feature are the same for all content types. That is, you choose the type of content to add to the application feature in the Content tab of the Features page of the maf-features.xml file's overview editor. For the specific steps for each content type, see Defining the Content Type of MAF Application Features.
Application features are automatically added to the MAF application when you create them using the MAF Feature Editor.
To work with the features in the application:
application
and MAF and double-click MAF Application Editor.Select a feature to define how it works in the application. For example, you can specify that the feature is available on the navigation bar, or on the springboard.
OEPE writes an entry in the maf-application.xml
file to reference the application feature that you add to the MAF application.
In the maf-application.xml
file, the refId
attribute of an <adfmf:featureReference>
element identifies the corresponding application feature in the maf-feature.xml
file. For this reason, the value of the refId
attribute for a <adfmf:featureReference>
element in the maf-application.xml
file must match the value of the id attribute defined for the <adfmf:feature>
element in the maf-feature.xml file
.
Use a naming convention consistently to make sure that application feature IDs are unique. Application feature IDs must be unique across a MAF application.
The example below shows the entries for the People application feature in the WorkBetter sample application's maf-application.xml
and maf-feature.xml
files.
<!-- Feature Reference ID in maf-application.xml File --> <adfmf:featureReference id="fr2" refId="People"/> ... <!-- Feature ID in maf-feature.xml File --> <adfmf:feature id="People" name="People" icon="images/people.png" image="images/people.png"> ...
As described in Creating MAF AMX Pages the MAF AMX components enable you to build pages that run identically to those authored in a platform-specific language. MAF AMX pages enable you to declaratively create the user interface using a rich set of components. Figure 2-6 illustrates the declarative development of an MAF AMX page, which involves selecting options in the Palette and adding them to the MAF AMX page.
Figure 2-6 Creating an MAF AMX Page
These pages may be created by the application assembler, who creates the MAF application and embeds application features within it, or they can be constructed by another developer and then incorporated into the MAF application either as an application feature or as a resource to an MAF application.
The project in which you create the MAF AMX page determines if the page is used to deliver the user interface content for a single application feature, or be used as a resource to the entire MAF application. For example, a page created within the application controller project, as shown in Figure 2-7, would be used as an application-wide resource.
Tip:
To make pages easier to maintain, you can break it down in to reusable segments known as page fragments. An MAF AMX page may be comprised one or more page fragments.
MAF enables you to arrange MAF AMX view pages and other activities into an appropriate sequence through the MAF task flow. As described in Creating Task Flows an MAF task flow is visual representation of the flow of the application. It can be comprised of MAF AMX-authored user interface pages (illustrated by such view activities, such as the WorkBetter sample application's default List page and the Detail page in Figure 2-8) and nonvisual activities that can call methods on managed beans. The non-visual elements of a task flow can be used to evaluate an EL expression or call another task flow. As illustrated by Figure 2-8, MAF enables you to declaratively create the task flow by dragging task flow components onto a diagrammer. MAF provides two types of task flows: a bounded task flow, which has a single point of entry, such as the List page in the WorkBetter sample application, and an unbounded task flow, which may have multiple points of entry into the application flow. The WorkBetter sample application sample application is This sample application is available from File > New > MAF Examples.
Figure 2-7 MAF Task Flow
MAF provides a number of dialogs and wizards to add MAF pages, reusable portions of MAF AMX pages called MAF page fragments, and application features. Figure 2-8 shows the menu options available from the File menu.
Figure 2-8 Options for Creating Resources for Application Features
Additional options are available from File > New > Other (see Figure 2-9). In the New dialog, expand Oracle then expand Mobile Application Framework
Figure 2-9 Wizards for Creating Resources for Application Features
You can use the MAF Page dialog to create AMX pages used for the user interface for an application feature, or as an application-level resource (such as a login page) that can be shared by the application features that comprise the MAF application. For more information on application feature content, see Defining the Application Feature Content as Remote URL or Local HTML.
To create an MAF AMX page as Content for an Application Feature:
Choose File > New and then MAF Page.
Complete the New MAF Page dialog, shown in Figure 2-10, by choosing the parent folder, for example ViewContent
and entering a name in the File Name field.
Figure 2-10 Creating an MAF AMX Page in an Application Controller Project
Select (or deselect) the Page Facets that are used to create a primary and secondary header and footer. Click OK.
For more information, see How to Use a Panel Page Component.
Click Finish. For more information using the AMX components, see Creating MAF AMX Pages. See also Defining the Application Feature Content as Remote URL or Local HTML.
To create an MAF AMX page as a Resource to an MAF application:
public_html
folder of the application controller project. Click OK.You can deliver the content for an application feature as an MAF task flow.
To create an MAF Task Flow as content for an application feature:
OEPE places the MAF AMX pages and task flows in the ViewContent node of the view project, as shown by employeeList.amx
and emp-task-flow-definition.xml
in Figure 2-12. These artifacts are referenced in the maf-feature.xml
file.
The task flows are also listed under the view project MAF node.
Other resources, such as customized application splash screen (or launch) images and navigation bar images, are also housed in the ViewContent node.
To manage the unbound task flows, OEPE generates the adfc-mobile-config.xml
file. Using this file, you can declaratively create or update a task flow by adding the various task flow components, such as a view (a user interface page), the control rules that define the transitions between various activities, and the managed beans to manage the rendering logic of the task flow.
Figure 2-12 MAF AMX Pages and Task Flows within the View Project
OEPE places the MAF AMX page and task flow as application resources to the mobile application in the ViewContent node of the application controller project. As illustrated in Figure 2-12, the file for the MAF AMX page is called application_resource.amx
and the task flow file is called ApplicationController-task-flow.xml
(the default name).
At the time of deployment, you can choose to wrap the MAF application with the OMSS (Oracle Mobile Security Suite) to take advantage of its enterprise mobile application management capabilities. OMSS allows secure access to corporate apps and data from mobile devices while preserving a rich user experience. Its Mobile Security Container creates the enterprise Workspace on any iOS or Android device, corporate-owned or personal. Employees get seamless access to corporate data and apps with enterprise-grade security and single sign-on authentication.
With the Mobile Security App Containerization Tool, you can add a standardized security layer to native mobile apps. The containerization process is simple and injects the following security services into your app.
Secure data transport: An encrypted AppTunnel through to application back-end resources behind an enterprise firewall.
Authentication: Managed by the Secure Workspace app and provides single sign-on across apps in the secure workspace.
Secure data storage: Encrypted storage of app data, including files, database, app cache and user preferences.
Data leakage controls: The ability to restrict file sharing and copy paste to only other trusted apps. This enables you to control the sharing of data, including e-mail, messaging, printing and saving.
Dynamic policy engine: More than 50 detailed app controls, including authentication frequency, geo and time fencing as well as remote lock and wipe.
The OMSS single sign-on authentication and user identity propagation to MAF app services is supported only for applications configured to use the Web SSO authentication server type for login connections. Applications using HTTP Basic or OAuth authentication will be required to log in to the MAF app after the Container authentication is successful. For details about these authentication types and the role they play in OMSS, see What You May Need to Know About Login Connections and Containerized MAF Applications.
The containerization process is simple and does not change the way you develop the MAF application. In fact, you should not change application code specifically with containerization in mind. You develop the MAF application the same way whether or not you intend to deploy with OMSS containerization enabled.
When you deploy the application with OMSS containerization enabled, OEPE runs the Mobile Security App Containerization Tool provided by OMSS to containerize the MAF application.
After deployment, the MAF app developer works with the OMSS system administrator to get the app added to OMSS Mobile App Catalog and to configure appropriate policies. For details, see the "Managing Mobile Apps" chapter in .
When the user launches the containerized MAF application, the Secure Workspace app redirects to the Mobile Security Container, which performs SSO authentication before handing the session back to the MAF application. The containerized MAF application does not require VPN to connect to internal websites or services. Instead a secure AppTunnel is established between the application and Mobile Security Access Server (MSAS), which provides secure transport for accessing internal sites and services that have been registered for access by mobile device users.
For more information about how OMSS containerization affects MAF applications, see these sections:
For the OEPE procedure to containerize the MAF application for OMSS, see Deploying with Oracle Mobile Security Suite.
For details about accessing secure web services behind the corporate firewall by the containerized MAF application, see What You May Need to Know About Accessing Web Services and Containerized MAF Applications.
For details about the authentication process of containerized MAF applications, see Overview of the Authentication Process for Containerized MAF Applications.
In the OMSS documentation library, refer to the following list of resources for details about OMSS administration tasks related to mobile devices and workspace containers.
For background information about OMSS, see the "Understanding Oracle Mobile Security Suite" chapter in .
For details about how system administrators use the OMSS Mobile Security Manager console to enroll the MAF application user's mobile device and workspace, see the "Enrolling Devices and Workspaces" chapter in .
For details about how system administrators use the OMSS Mobile App Catalog to manage the MAF application provisioned to devices and workspaces, see the "Managing Mobile Apps" chapter in .
For details about how system administrators use the OMSS Mobile Security Manager console to manage access to a corporate file shared by MAF application capabilities, see the "Managing Mobile Security Policies" chapter in .
In the OMSS documentation library, refer to the following list of resources for details about MSAS administration tasks related to securing resources and authentication.
For background information about MSAS, see the "Getting Started with Mobile Security Access Server" chapter in .
For details about how system administrators create a proxy application to define forward proxy URLs for protected resources accessed by MAF applications, see the "Managing Mobile Security Access Server Applications" chapter in .
For details about how system administrators attach predefined security policies to forward proxy URLs and secure access by the MAF application to protected web services, see the "Securing Mobile Security Access Server Resources" chapter in .
For details about how system administrators configure a MSAS authentication endpoint to handle authentication on the MAF application user's mobile device by the Secure Workspace app, see the "Configuring a Mobile Security Access Server Instance" chapter in .