Developing MAF Applications with OEPE

Developing MAF Applications

with

Oracle Enterprise Pack for Eclipse - OEPE

As previously mentioned in Blog Entry "Android and iOS development comes to OEPE 12.13.1",  MAF development has certainly come to Oracle Enterprise Pack for Eclipse (OEPE). In many ways the development experience is very smooth and it has a clean interface.

I can understand the development community preference and mass adoption of this IDE and for those of us who have become familiar with JDeveloper, here are some points to get you started and introduce you to the Eclipse development experience with MAF.

Getting started ... OEPE Download

 As with the JDeveloper installation, OEPE should be downloaded and installed if a supported version of Eclipse is not already installed. I will use the "Happy Path" in this entry as the documentation does a great job in describing the various installation options.

As the download page states there are two versions of the OEPE but you should download your platform version  of the  12.1.3.1.1 with Oracle Mobile Application Framework (MAF). This distribution provides the traditional OEPE feature set with additional design time tools for mobile application development, the MAF runtime, and MAF sample applications. i.e. No need to update your installation afterwards with the MAF component extensions.

Getting started ... OEPE SDK Configuration

 Working with OEPE for MAF is similar to JDeveloper and as such you first steps will be to configure OEPE with the path to your Mobile SDKs, provide any keystore information for Android or provisioning profiles for iOS projects.

The process is similar to what we've been used, except it provides some smart wizards to get us through the process. From the Preferences menu option, drill down to Oracle -> Mobile Application Framework and add you SDK settings.

IOS SDK Configuration

MAF IOS SDK

Android SDK Configuration

MAF Android SDK settings

Notice the ADD button on each screen which allows support of multiple SDKs, keystores, or provisioning profiles.

Getting Started ... Running a Sample ( O! I mean, an Example :D )

 A good place to start is by verifying your configuration by deploying a MAF Sample Application. This is another small but nice difference in the OEPE user experience. To Open and Run a sample, simple create a new MAF Example. No need to find and then extract the samples to a project folder.

Create a New MAF Example Application, if this menu option is not showing yet, then just select Example and then you should find the MAF Example template selection item. Clicking next presents a selection of examples to choose from and I would suggest for your first MAF Workspace to select them all and have them conveniently located in a single location.  Once you've selected the example you may create a Run or Debug Configuration to deploy and test your application to a configured target.

New MAF Example

Create a New MAF Example Application


The first thing you will notice after the application wizard is finished is 3 sets of folders and not just 2. The wizard generates the standard projects we are used to; The Application, & the ViewController or simply View projects. What is new is a new deployment project, or more correctly as per the documentation, the top-level assembly project. 

OEPE MAF Application Projects

OEPE MAF Project Folders

 The assembly project holds all the related packaging and deployment artifacts.  Some of the files we have had to search for in the application resources view in JDeveloper, such as default images, application, logging or connections settings which lived in the various META-INF directories, now have a respectable consolidated area.

When you are ready to Run or Debug your mobile app then this is the project to choose to have it deployed to your test simulator, emulator, device or production package. To ensure that all is well with your environment I would suggested running one of the examples now.

Getting Started ... Deploying a MAF Application in OEPE

 In this process we don't talk about deploying an application but running one on a configured target configuration. To do this, select your top-assembly project (!Application && !View) and select Run As or Debug As from the context menu. The configuration will defined the target to build and deploy the application. 

Create a configuration for each of your target by select the assembly project, target platform, type of target with the required settings. The Advanced options are used to further refine the application settings found under the Jdeveloper Application properties -> Deployment Profile -> Target (Android || IOS) Profile -> Target  (Android || IOS) Options -> Application Images.

Run Configuration for IOS

IOS Run Configuration

Once defined, simply click run.

To run a configuration afterwards, simply select it from under the Debug or Run icons in the IDE. Run and Debug Icons

I'll cover configuring the Debugger later, if it proves problematic for the community but from my brief encounter, debugging is quite nice under eclipse and there is no need to open a secondary application to view the log file being created or using the Android Monitor to filter out your application messages. 

Getting Started ... Creating a MAF Application in OEPE

So, what should you know about creating a MAF application in OEPE is that it is fairly similar to creating one in Jdeveloper, with the exception that you have the assembly project. You have different perspectives to perform the various tasks based on the type of component you are working on. You have the same relationship between the Application and the View projects with some small differences; such as the new MAF folder which houses the Data Control Manager, the editor interface for the DataControl.dcx file.

MAF Assembly Project MAF Application & View Projects

In the assembly project the MAF folder displays the MAF Application Editor, the editor for the maf-application.xml. This project also exposes the application resource and other configuration files, normally in the resources view in JDeveloper and the hidden .adf folder of the application.

After the creation wizard is complete you will have everything you need to start developing your MAF application, except the connections.xml file which is used to keep track of your application resource links. The easiest way to create this file is from the MAF Application Editor. Once the editor is open, select the security component or tab, for lack of a better term, and you will find a hyper link for the connections.xml file which is also used to store URL White Lists. Simply select the link and you will be prompted to create the connections.xml.

Create Connections.xml 

Create Connections.xml from the MAF Application Editor

Getting this created was the easy part and for  SOAP based resources this ease of use continues but for those focused on the consumption of Restful services, you will have to create the connection entry manually. I will provide a sample connect entry at the end for those of you who do not have access to Jdeveloper and the Rest Data Control wizard.

This feature will be released in a future version of OEPE for MAF but once the connection URL has been added, consuming, transforming and exposing the Restful services and data is the same process and APIs.

Some other differences to mention are:

  • The Palette area combines the Component and Data Control perspectives in Jdeveloper
  • The Structure pane is called Outline, which shows the xml document format and not the component type icons, which make it easier to develop pages/views as in JDeverloper. You can still edit your page/view in this manner but be careful to read the component text and its level before dropping your new component onto the page.
  • Flow actions, defined in your task flow, are only listed in the "Select a Value" / "Select an Outcome" screen and not in the drop down list of the action property. The pulldown only list "__back", the default return action
  • The Console window has multiple views and you will need to click / select it to switch between the build/deployment view and the running application log view
  • To debug your application you need to configure a Remote Java Application configuration to connect to the Debug port connection property
  • To Debug your application, start the application first then the debugger

Summary

 To wrap up, I'd just like to say that OEPE development experience for MAF is good and only lacks a few wizards found in JDeveloper. It supports multiple SDK environments and versions as well as keystone and provisioning profiles, which will come in handy for customer development projects.

The integrated log console view is great as well as the debugger for the application's java code. The only negative exception is the lack of wizard to add Rest URL connections, which I hope we will see released soon. For a first release this is great start and I look forward to seeing what the future holds for both OEPE and MAF development.

Please add your experiences and comments, so the PMs can keep improving OEPE and MAF in general.

Regards Sydney 

Sample Connections.xml with a Rest URL connection defined

<References xmlns="http://xmlns.oracle.com/adf/jndi">
  <Reference name="SampleRestServicesURL" className="oracle.adf.model.connection.rest.RestConnection" xmlns="">
    <Factory className="oracle.adf.model.connection.rest.RestConnectionFactory"/>
    <RefAddresses>
      <XmlRefAddr addrType="SampleRestServicesURL">
        <Contents>
          <restconnection name="SampleRestServicesURL"
                          url="http://127.0.0.1:7101/SampleRestServices/SampleRestServices/"/>
        </Contents>
      </XmlRefAddr>
    </RefAddresses>
  </Reference>
</References> 

Comments:

" only lacks a few wizards..."

I'd say the most obvious flaw is the lack of a WSIWYG editor for the AMX pages. That should be first on any list for OEPE improvements.

Posted by guest on January 21, 2015 at 12:04 PM PST #

Thanks For Your valuable posting, it was very informative. Am working in<a href="http://www.excelanto.com">Erp Software Company In India</a>

Posted by Bharathi Baskar.B on April 09, 2015 at 02:09 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blog is is dedicated to announcements,tips and tricks and other items related to developing, integrating, securing, and managing mobile applications using Oracle's Mobile Platform. It is created and maintained by the Oracle Mobile product development team.

Archive of past entries

Even More Mobile Development Blogs

Oracle A-Team Site - Mobile Related Entries

Code samples from the Community

Fusion Middleware Blogs

Search


Archives
« April 2017
SunMonTueWedThuFriSat
      
1
3
5
6
7
8
9
11
13
14
15
16
18
19
20
21
22
23
24
25
26
27
28
29
30
      
Today