C MAF Application and Project Files

This appendix provides a reference for the files that OEPE generates when you create a MAF application using the Mobile Application Framework Application template.

This appendix includes the following section:

C.1 Introduction to MAF Application and Project Files

OEPE creates a MAF application with the assembly, application, and the view controller-type projects. Use the OEPE - generated files within these projects to configure a MAF application and application features by means of editors such as the MAF Application Editor, or the MAF Features Editor.

By default. OEPE creates a MAF application with three projects:

  • The top-level or assembly project. This holds all of the artifacts required for packaging and deployment of the application. In addition, the assembly project tracks the version of the MAF run time that the project uses, if you are migrating an application from an earlier version of MAF.

  • The application project, applicationApplication

  • The view controller-type project, applicationView. This contains the source folder (src) and the ViewContent folder.

The data controls are:

  • The Device Features data control. The Apache Cordova Java API is abstracted through this data control, thus enabling the application features implemented as MAF AMX to access various services embedded on the device.

  • The Application Features data control, which enables you to build a springboard page.

See About the Assembly-Level Resources, About the Application Project Resources, and About the View Project Resources.

OEPE also generates files within these projects that you use to configure your MAF application and application features or files that your MAF application needs when you deploy it to the targeted platform. In almost every case, you do not work with the generated files directly. Instead you use the editors, such as the MAF Application Editor, the MAF Features Editor and the Data Control Manager.

C.2 About the Assembly-Level Resources

The assembly project generated by OEPE is responsible for application security and the way the application is displayed on a mobile device. Access the listed application-level artifacts in the project from the Project Explorer pane.

OEPE generates the files for the MAF application in the assembly project. These files, described in Table C-1, contain configuration files for describing the metadata of the MAF application. You access these files from the Project Explorer pane shown in Figure C-1.

Figure C-1 Mobile Application Artifacts

The surrounding text describes the image.

The assembly project (generated with the default name, application), which contains the application-wide resources, provides the presentation layer of the MAF application in that it includes metadata files for configuring how the application will display on a mobile device. This project dictates the security for the MAF application and can include the login page of the application, an application-wide resource. The application controller project is essentially a consumer of the view controller project, which defines the application features and their content.

You edit application-level artifacts using the MAF Application Editor which edits maf-application.xml. It is used for configuring the MAF application itself, such as its name, the application lifecycle listener (LifeCycleListenerImpl.java), the login server connections for the embedded application features.

Table C-1 Mobile Application-Level Artifacts Accessed Through Assembly Project

Artifact(s) File Location Description

maf-application.xml

assembly project directory\adf\Meta-INF

For example:

workspace\application name\adf\META-INF\maf-application.xml

A stub XML application descriptor file that enables you to define the MAF application. Similar to the application descriptors for ADF Fusion Web applications, this enables you to define the content for an application, its navigation behavior, and its user authentication requirements.

You edit this file using the MAF Application Editor.

maf-config.xml

assembly project directory\adf\Meta-INF

For example:

workspace\application name\adf\META-INF\maf-config.xml

Use to configure the default skin used for MAF applications.

Application images

assembly project directory\res\android

assembly project directory\res\ios

For example:

workspace\application name\res\ios\Default.png

A set of images required for the deployment of iOS and Android applications. These include PNG images for application icons and splash screens. Deployment to an iOS-powered device, such as an iPhone, requires a set of images in varying sizes.

The default iOS images provided with the project include:

  • images used when the device is in both landscape and portrait orientations

  • images used for retina displays (that is, icon.png and icon@2x.png)

  • an iPad image (icon-72.png)

To override these images, see How to Add a Custom Image to an Android Application.

cacerts

assembly project directory\lib\security

For example:

workspace\application name\security\cacerts

The cacerts certificate file, a system-wide keystore that identifies the CA certificates to JVM 1.4. You can update this file using the Java keytool utility. You can create a custom certificate file using keytool as described in Configuring a MAF Application to Enable Two-Way SSL for Authentication.Any certificate file must reside within the Security directory.

logging.properties

assembly project directory\META-INF

For example:

workspace\application name\META-INF\logging.properties

Enables you to set the application error logging, such as the logging level and logging console. For more information, see Using and Configuring Logging in MAF Applications.

maf.properties

assembly project directoryMETA-INF

For example:

workspace\application name\META-INF\maf.properties

The configuration file for the Java virtual machine, JVM 1.4. Use this file to configure the application startup and heap space allotment, as well as Java and JavaScript debugging options. For more information, see How to Enable Debugging of Java Code and JavaScript.

adf-config.xml

assembly project directory\adf\META-INF

For example:

workspace\application\adf\META-INF\adf-config.xml

Used to configure application-level settings, including the Configuration Service parameters. See also Configuring End Points Used in MAF Applications.

connections.xml

assembly project directory\adf\META-INF

For example:

workspace\application\adf\META-INF\connections.xml

The repository for all of the connections defined in the MAF application.

sync-config.xml

assembly project directory\.adf\META-INF

For example:

workspace\application\META-INF\sync-config.xml

The configuration file for the offline cache of data returned from REST web services. Caching not only improves the user experience by boosting performance, but allows users to read and view data when they are working in an off-line mode.

C.3 About the Application Project Resources

The application project in OEPE creates the features that comprise a MAF application. Use the MAF Features Editor to edit the listed application-level artifacts.

Within the application project itself (which is generated with the default name, applicationApplication) OEPE creates the following artifacts, listed in Table C-2.

Figure C-2 Application Project

This image is described in the surrounding text

You edit application-level artifacts using the MAF Features Editor which edits maf-feature.xml. It describes which application features comprise the MAF application.

Table C-2 Application Project Artifacts

Artifact(s) File Location Description

LifeCycleListenerImpl.java

application project directory\src\application

For example:

workspace\application project\src\application\LifeCycleListenerImpl.java

The default application lifecycle listener (ALCL) for the MAF application.

maf-skins.xml

application project directory\src\META-INF

For example:

workspace\application project\src\META-INF\maf-skins.xml

Defines the available skins and also enables you to define new skins.

See Skinning MAF Applications.

adfm.xml

application project directory \adfmsrc\META-INF

For example:

workspace\application project\adfmsrc\META-INF\adfm.xml

Maintains the paths (and relative paths) for the .cpx, .dcx, .jpx, and .xcfg files (registries of metadata).

DataControls.dcx

application project directory\adfmsrc\application

For example:

workspace\application project\adfmsrc\application\DataControls.dcx

The data controls registry. For information on using the DeviceFeatures data control, which leverages the services of the device, see Using Bindings and Creating Data Controls in MAF AMX. For information on the ApplicationFeatures data control, which enables you to create a springboard page that calls the embedded application features, see What You May Need to Know About Custom Springboard Application Features with MAF AMX Content.

C.4 About the View Project Resources

The view controller project includes application pages and application feature-level resources, such as images for icons. Use the MAF Feature Editor to edit view controller artifacts.

The view project (which is generated with the default name, applicationView), as illustrated in Figure C-3) houses the resources for the application features. Unlike the application project described in About the Assembly-Level Resources, the metadata files of the view project describe the resources at the application feature-level, in particular the various application features that can be aggregated into a MAF application so that they can display on a mobile device within the springboard of the MAF application itself or its navigation bar at runtime. Further, the application feature metadata files describe whether the application feature is comprised of HTML or MAF AMX pages. In addition, the view controller project can include these application pages as well as application feature-level resources, such as icon images to represent the application feature on the springboard and navigation bar defined for the MAF application.

Tip:

Store code specific to an application feature within the view controller project. Use the application controller project as the location for code shared across application features, particularly those defined in separate view controller projects.

The view controller project can be decoupled from the application controller project and deployed as an archive file for reuse in other mobile applications as described in Introduction to Feature Archive Files,." In rare cases, an application controller project can consume more than one view controller project.

Note:

Adding a MAF view controller project as a dependency of another MAF view controller project, or as a dependency of a MAF application controller project, prevents the deployment of a MAF application.

Figure C-3 View Project

This image is described in the surrounding text

These resources include the configuration file for application features called maf-feature.xml, which you edit using the MAF Feature Editor.

Table C-3 View Controller Artifacts

Artifact(s) File Location Description

maf-feature.xml

view project directory\src\META_INF

For example:

workspace\application View\src\META-INF

A stub XML descriptor file that enables you to define application features.

You can deploy this application using the default deployment configuration settings. See Deploying MAF Applications.

Application-Specific Content

view project directory\public_html

For example:

workspace\application View\public_html

The application features defined in maf-feature.xml display in the public_html directory. Mobile content can include MAF AMX pages, CSS files, and task flows. Any custom images that you add to an application feature must be located within this directory. See What You May Need to Know About Selecting External Resources.