You would need to get Apple Development Provisioning Profile (this costs around $100), in order to be able to install MAF application on iPad device for testing. Provisioning Profile creation process is streamlined in iOS 8 and is simple to follow. Here is the example of our Apple Development Provisioning Profile entry, this can be download and installed on Mac OS with one click:

Sample MAF application I'm going to deploy is connecting to the REST service. Make sure to set proper IP address for the REST connection entry in MAF. IP must point to the Service Bus service with published REST connection:

JDeveloper 12c is fetching Provisioning Profile information automatically. You only need to copy paste Common Name from iOS development certificate into Signing Identity field (created and registered during Provisioning Profile creation process):

Make sure to specify the same Application Bundle Id prefix as the one registered in Provisioning Profile. Documentation states you can test MAF application on iPhone/iPad device only in Debug mode, however this is not true - it works fine in Release mode as well:

Thats it with configuration. Choose to deploy MAF application into IPA distribution package:

IPA distribution package file must be generated in deploy folder. Double click on it and it will get installed into iTunes:

Open iPhone/iPad section in iTunes and go to the App category. You should see your new MAF application listed there. Click on Install button and then press Synch - this will install application into the device:

Application is successfully loaded and dashboard screen is displayed. Service Bus provides REST data to the MAF application running on the iPad, data is rendered in Tree Map graph (MAF component):

User could switch to Employees screen:

Alta UI look and feel - we could search for employees and browse through a list with shortcuts:

Switch to cards view, instead of default list view:

Select employee who is a manager:

Pie graph with compensation of managed employees is displayed:

List of managed employees is also present:

I have tested AirPlay and connected iPad with Mac. This is useful to display iPad screen on projector, when you want to demonstrate your app to the audience. AirPlay synchronisation works pretty well, without configuration headache (you may require additional utility application for this). You must enable mirroring on your iPad device:

We are getting iPad screen view on the Mac. This is pretty useful for the presentations and demos:

Monday, February 23, 2015

We have integrated Red Samurai ADF Performance Audit Tool with Oracle DMS Spy Servlet. Integration is dynamic and doesn't require any extra configuration. It brings out of the box information about ADF Task Flow usage and performance. This means we are analysing from now on not only ADF BC performance data, but ADF Controller data also.

DMS Spy Servlet context is accessed in certain intervals and we are not only displaying DMS data, but storing it inside our audit tables. This allows to keep historical data and preserve it between WLS restarts - this is not possible with DMS Spy Servlet alone.

Graph is clickable, user could select a box and detail data for the Task Flow will be displayed. We are displaying a number of Active/Maximum Active Task Flows over time. Average load time is logged and displayed - this allows to identify Task Flows with slow performance:

Thursday, February 19, 2015

In this post I would like to explore and integrate two thing - ADF BC Range Paging and REST service pagination. It would inefficient to retrieve entire set of data in the REST service, ideally should be available option to specify number of rows and range number to fetch. ADF BC allows to query VO in Range Paging mode - SQL query will be constructed with row numbers, to query data in certain range of rows (this allows to fetch less data from DB). We could combine this with REST service and provide light interface to access data.

Here you can download sample application - RestADFBCApp.zip (compiled with ADF 12c). I'm translating ADF BC VO structure into HashMap, this allows to publish unified structure through REST, without creating a separate POJO object. There is a special generic method called toHashMap, it iterates over VO attributes and constructs a HashMap with attribute names and values:

Generic AM method accepts parameters for page number and range size. Here we enforce Range Paging mode for VO and using ADF BC API methods to scroll to the certain page and set the range size (number of rows to fetch). It is important to get results from default rowset, otherwise ADF BC will generate a separate default SQL query:

ViewController project contains a list of references to the REST and Jersey related libraries, these extra libraries are required to transform HashMap to the REST response:

Here is the REST method. I'm accessing ADF BC Application Module and invoking custom method, with range size and page number coming from the REST request. Result is a list of HashMaps - a set of VO rows:

Make sure there is Jersey servlet defined in web.xml, REST request will not work without it:

Here is the example, where I perform a request through REST for rangePage = 1 and rangeSize = 10. This means 10 rows from the first page of rows are fetched:

You should check SQL query in the log. REST request from above generates a special SQL with ROWNUM. This means we are retrieving less data from DB, only data we need to display in the current page:

Tuesday, February 3, 2015

One of the main advantages of Oracle Mobile Suite - Service Bus and SOAP/REST web service transformation (more here - Oracle Mobile Suite Service Bus REST and ADF BC SOAP). In addition you will get very nice performance improvement, there is out of the box caching for Web Service resultset with Coherence. I'm going to demonstrate how it works, all out of the box - really simple.

You could define caching for external service (ADF BC SOAP web service in my case), just edit service definition. This is our business service running on WebLogic backend, where actual processing happens. Naturally we would like to eliminate duplicate calls and retrieve previous resultsets from cache stored in Service Bus layer:

Wizard allows to enable result caching by cache token expression. In my case, nameVar is a variable from ADF BC SOAP web service, findEmployees method. You could use a wizard to construct expression. On runtime it will cache resultsets for all the requests according to specified expression. Basically it will cache all invocations of findEmployees method and will track cached data by nameVar parameter value. You could specify cache expiration time, if data is updated more often, expiration time should be shorter. Expiration time even can be dynamic, taken from the request variable:

That't is - this was really simple. All Coherence complexity is hidden and you don't need to worry about it.

I will be running MAF application to perform a test. Here I'm searching by value - th:

If we would check WebLogic log, where ADF BC SOAP web service is deployed, we could see the SQL query was executed with nameVar=th (as per search request in MAF application screen):

Let's run a different query now, search for nameVar=ew:

Again repeat previous search with nameVar=th, there should be query executed on WebLogic server with ADF BC SOAP web service, result should be taken from cache stored in Service Bus (as directed per performance optimization tuning above):

Indeed there was no SQL query executed for nameVar=th this time, data was taken from cache - this is great performance optimisation: