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

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

  • Assembly project, which contains application-wide resources such as a login page if you configure security for your MAF application.

  • Application project, which contains the Data Control Manager.

  • View project, which contains application feature resources such as HTML, AMX, or task flow files that render the content of an application feature.

For more information about these projects, see Section C.2, "About the Application Controller Project-Level Resources" and Section C.3, "About the View Controller 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

Oracle Enterprise Pack for Eclipse generates the files for the MAF application in the assembly project. These files contain configuration files for describing the metadata of the MAF application. You access these files from the res node under the assembly project in the Project Explorer, shown in Figure C-1.

Figure C-1 Mobile Application Artifacts

This image is described in the surrounding text

The assembly project (which is 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 application's login page, 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.

Tip:

Place code that supports application-wide functionality, such as an application-level lifecycle listener, in the application controller project.

Table C-1 Mobile Application-Level Artifacts Accessed Through Top_Level 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.

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 Section 27.2.4.5, "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 Section 29.8, "Supporting SSL."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 Section 30.4, "Using and Configuring Logging."

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 Section 30.3.5, "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 Chapter 17, "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.


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

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.

For more information, see Chapter 8, "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 Chapter 14, "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 Section 5.6, "What You May Need to Know About Custom Springboard Application Features with MAF AMX Content."


C.3 About the View Project Resources

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 the view project's metadata files 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 Section 9.1, "Working with 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.

After you have configured the Mobile Preferences as described in Oracle Enterprise Pack Installing Oracle Enterprise Pack for Eclipse you can deploy this application using the default deployment configuration settings. For more information, see Chapter 27, "Deploying Mobile 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. For more information, see Section 6.3, "What You May Need to Know About Selecting External Resources."