Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
REAL-LIFE ORACLE MAF
Luc Bors eProseed NL
ODTUG KScope 2015
Hollywood Florida
June 23rd 2015
Things You Don’t Learn from Oracle’s
Developer’s Guide
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |2
WHO AM I ?
•  Luc Bors
•  Managing Partner
•  eProseed NL
•  Oracle Partner
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared for the Server Side Developer ?
1
2
3
4
5
3
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |4
BEFORE WE START
•  Let’s look at some basic terms related to MAF and
Mobile
– Springboard
– Gestures	
– Feature
– Device Interaction
– Notifications
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
5
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |6
TO DND OR NOT TO DND ?
•  Drag and Drop Development
•  Pro’s
– Quick
•  Cons
– Dirty
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |7
TO DND OR NOT TO DND ?
•  Drag and Drop Development Demo
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |8
TO DND OR NOT TO DND ?
•  Drag and Drop Development of your app
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |9
CREATE FRAGMENTS
•  Create Fragments that
can be re-used
•  Fragments can have
styling
•  Assign Attribute values
when Fragment is used
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |10
USE FRAGMENTS
•  Drop fragment on
page
•  Assign Attribute
values
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |11
TO DND OR NOT TO DND ?
•  The hard work
– Create page fragments first
– Create bindings manually
– Assign attribute Values
•  VS
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
12
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |13
DEVICE PROPERTIES
•  Benefit from Device properties
•  Do what is possible,
avoid what cannot be done
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |14
LOADING IN THE BACKGROUND
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
HOW IT WORKS
•  Check network connectivity
– #{deviceScope.hardware.networkStatus}
– "wifi", "2g", "unknown", "none”, etc etc
•  Start background thread
– Load Images in background
15
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |16
LOADING IN THE BACKGROUND
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DEMO
17
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
18
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
CONTROLLING YOUR APPLICATION
•  Springboard configuration in adfmf-application.xml
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THE DEFAULT SPRINGBOARD
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THE CUSTOM SPRINGBOARD
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
CONFIGURING THE SPRINGBOARD
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
FEATURE ARCHIVES
•  Feature Archives can be reused
•  Deploy MAF app as FAR
•  Consume features from FAR in other apps
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |24
CUSTOM TOGGLE SPRINGBOARD
•  What is the Default ?
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |25
CUSTOM TOGGLE SPRINGBOARD
•  Use AdfmfSlidingWindowUtilities API.
– oracle.adfmf.framework.api.AdfmfSlidingWindowUtilities
– Note that the sliding window plugin API can only be used for
features defined within the application that do not appear in
the navigation bar and is not the springboard feature .
– So in order to make a custom springboard that nicely slides in
and out of view we need to instruct the app that it has NO
springboard, and create a custom feature that functions as a
springboard.
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |26
CUSTOM TOGGLE SPRINGBOARD
•  What is the Custom ?
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DEMO
27
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
28
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
GESTURES ( AND UX )
•  Gestures can be
used from:
– Buttons
– Links
– List Item
<amx:showPopupBehavior popupid="pop1"
type="tapHold“ />
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
GESTURE ABUSE
•  .. Or how to confuse your app user…
<amx:showPopupBehavior popupid="pop1"
type=”swipeLeft“ />
<amx:actionListener binding="#{mybean.deleteRow}"
type=”swipeDown"/>
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
WHAT APPLE DID (IOS6 à IOS7)
•  I rest my case……
•  Make sure to be
aware of the right
standard:
– For Device
– For OS
– For version
•  They changed delete swipe from right to left…….
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THIS IS HELPFULL
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
USE CASE EXAMPLE
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
INGREDIENTS
•  A (Web) service and datacontrol
•  A Page with Listview
•  An ActionListener with type
SwipeDown
•  Smart Java Code to call service
(conditionally)
<amx:listView var="row”
value="#{bindings.allLocations.collectionModel}"
fetchSize="#{bindings.allLocations.rangeSize}”
id="lv1">
<amx:listItem id="li1">
<amx:actionListener type="swipeDown”
binding="#{pageFlowScope.locationsBackingBean.checkForUpdates}”>
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
EXAMPLE
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
BONUS PATTERN (ACTION COMPLETE)
•  Description:
– User performs action
– App confirms and navigates back
•  Challenge:
– Programmatic popup from JAVA
•  Solution:
– Call Javascript from Java
– Invoke (Hidden) Buttons (with showPopupBehavior) from JavaScript
36
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(
FeatureContext.getCurrentFeatureId(),
"popupUtilsShowPopup",
new Object[] {"_popShowId", text});
adf.mf.api.amx.triggerBubbleEventListener(popupOpener,"tap");
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DEMO
37
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
38
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
WHERE ARE MY LOGFILES ?
•  Finding the actual log file for an app, particularly since
iOS 8 and Xcode 6, is a somewhat tricky
•  Logfile
– application.log
39
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THERE ARE MY LOGFILES !
•  iOS simulator content
– /Users/lucbors/Library/Developer/CoreSimulator
40
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THERE ARE MY DEVICES !
•  iOS simulator content
– /Users/lucbors/Library/Developer/CoreSimulator/Devices
41
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THERE IS MY DEVICE !
•  iOS simulator content
– /Users/lucbors/Library/Developer/CoreSimulator/Devices
– Use ls -lt
42
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THERE IS MY APPLICATION !
•  iOS simulator content
– /Users/lucbors/Library/Developer/CoreSimulator/Devices/
<device>/data/Containers/Data/Application
43
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
THERE IS MY LOGFILE !
•  iOS simulator content
– /Users/lucbors/Library/Developer/CoreSimulator/Devices/
<device>/data/Containers/Data/Application/<app>/Documents/
logs
44
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
WHERE ARE MY LOGFILES ?
•  Change Location
45
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared ?
1
2
3
4
5
46
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DEVICE INTERACTION
•  The Device
Datacontrol
•  Drag n Drop support
•  Attributes as fields
•  Operations as buttons
•  Or as a link
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
BEHIND THE SCENES
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
CAMERA INTERACTION
•  Take a picture ……………
import oracle.adf.model.datacontrols.device;
DeviceManager dm = DeviceManagerFactory.getDeviceManager();
if (dm.hasCamera){
dm.getPicture(
100,
DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI,
DeviceManager.CAMERA_SOURCETYPE_CAMERA,
false,
DeviceManager.CAMERA_ENCODINGTYPE_PNG,
200,
200);
}
DeviceManager.CAMERA_SOURCETYPE_PHOTOLIBRARY
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
MOBILE MAPS
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
GOOGLE PLACES
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
USE GPS FOR LOCATION BASED SERVICES
public Location getPosition(){
DeviceManager dm=DeviceManagerFactory.getDeviceManager();
Location currentPosition = dm.getCurrentPosition( 60000,true);
return currentPosition;
}
Location myPosition = getPosition();
String locationParameter = “location=”
+ myPosition.getLatitude();
+”,”
+ myPosition.getLongitude();
restServiceAdapter.setRequestURI(
"json?”
+locationParameter
+”&radius=1000”
+”&types=food”
+”&sensor=false&key=<yourApiKey>");
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DISPLAY ON THE MAP
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |54
PUSH NOTIFICATIONS
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
LOCAL NOTIFICATIONS
•  Declarative
– DeviceFeatures DC
•  JavaScript API
– adf.mf.api.localnotification
•  Java API
– adfmfContainerUtilities
55
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
CREATING A LOCAL NOTIFICATION
•  AdfmfContainerUtilities.addLocalNotification(options)
•  AdfmfContainerUtilities.cancelLocalNotification(notificationId);
56
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
REPEATING LOCAL NOTIFICATIONS
57
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |58
CANCELING REPEATING NOTIFICATIONS
•  Cancelling a notification means that the notification is
COMPLETELY cancelled even if it was scheduled to
fire every DAY
•  Create a new one after cancelling
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
DEMO
59
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |
PROGRAM AGENDA
Introducing Oracle MAF
The Basics; DnD Development
Device Properties, Springboard, Gestures (Common Patterns)
Some Annoyances
Device Interaction
REST JSON : Be Prepared
1
2
3
4
5
60
6
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |61
OVERVIEW OF A MAF SOLUTION
JSONBeanSerializationHelper
POJO Datacontrol Data Objects
Data Objects
Data ObjectsDataArray
REST Adapter
MAFBindingLayer
RemoteRESTJSON
R
E
S
T
C
o
n
n
e
c
t
i
o
n
MAF App
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |62
MAF WITH REST JSON ON OSB
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |63
CLASS HIERARCHY
RestCallerUtil
FlightCustURIs
JsonArrayToFlightPassengerListArray JsonArrayToFlightDetailsArray
FlightPassengerListArray FlightDetailsArray
FlightPassengerListEntity FlightDetailsEntity
FlightPassengersDC
CustomerComplaintEntity
FlightsRestService
CustomerComplaintObject
CustomerComplaintObjectToJsonObject
CustomerRestService
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |64
RESTSERVICE ADAPTER DOES THE CALL
•  setRequestType
– REQUEST_TYPE_GET à to GET flights and Passengers
– REQUEST_TYPE_POST à to POST a complaint
•  setConnectionName: To use the correct REST-connection
•  setRequestURI à What is it that we want to do
–  /flights/KL34
–  /flights/KL34/passengerlist
–  /complaints
•  NOTE: Request URI are bundled in a Custom Class (FlightCustURIs)
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |65
DEMO WITHOUT THE OSB
{ "FlightCode": {
"CarrierCode": "KL",
"FlightNumber": "34"
},
"FlightDate": "2015-03-07T09:50:00.000+01:0
"TotalNumberOfPassengers": "22",
"Passengers": [
{
"FirstName": "Diana",
"LastName": "Woodstock",
"Country": "UK",
"FrequentFlyerNumber": "BB123332",
"Seat": "2B"
},
{
"FirstName": "William",
"LastName": "Simon",
"Country": "US",
"FrequentFlyerNumber": "KK9182673",
"Seat": "4C"
},
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |66
SUMMARY
•  Many Options to Develop
•  Many Features to Use
•  Highly Configurable
•  Use Common Patterns
Copyright © 2014, eProseed and/or its affiliates. All rights reserved. |

Real life-maf-2015-k scope-final

  • 1.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | REAL-LIFE ORACLE MAF Luc Bors eProseed NL ODTUG KScope 2015 Hollywood Florida June 23rd 2015 Things You Don’t Learn from Oracle’s Developer’s Guide
  • 2.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |2 WHO AM I ? •  Luc Bors •  Managing Partner •  eProseed NL •  Oracle Partner
  • 3.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared for the Server Side Developer ? 1 2 3 4 5 3 6
  • 4.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |4 BEFORE WE START •  Let’s look at some basic terms related to MAF and Mobile – Springboard – Gestures – Feature – Device Interaction – Notifications
  • 5.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 5 6
  • 6.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |6 TO DND OR NOT TO DND ? •  Drag and Drop Development •  Pro’s – Quick •  Cons – Dirty
  • 7.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |7 TO DND OR NOT TO DND ? •  Drag and Drop Development Demo
  • 8.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |8 TO DND OR NOT TO DND ? •  Drag and Drop Development of your app
  • 9.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |9 CREATE FRAGMENTS •  Create Fragments that can be re-used •  Fragments can have styling •  Assign Attribute values when Fragment is used
  • 10.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |10 USE FRAGMENTS •  Drop fragment on page •  Assign Attribute values
  • 11.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |11 TO DND OR NOT TO DND ? •  The hard work – Create page fragments first – Create bindings manually – Assign attribute Values •  VS
  • 12.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 12 6
  • 13.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |13 DEVICE PROPERTIES •  Benefit from Device properties •  Do what is possible, avoid what cannot be done
  • 14.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |14 LOADING IN THE BACKGROUND
  • 15.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | HOW IT WORKS •  Check network connectivity – #{deviceScope.hardware.networkStatus} – "wifi", "2g", "unknown", "none”, etc etc •  Start background thread – Load Images in background 15
  • 16.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |16 LOADING IN THE BACKGROUND
  • 17.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DEMO 17
  • 18.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 18 6
  • 19.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | CONTROLLING YOUR APPLICATION •  Springboard configuration in adfmf-application.xml
  • 20.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THE DEFAULT SPRINGBOARD
  • 21.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THE CUSTOM SPRINGBOARD
  • 22.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | CONFIGURING THE SPRINGBOARD
  • 23.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | FEATURE ARCHIVES •  Feature Archives can be reused •  Deploy MAF app as FAR •  Consume features from FAR in other apps
  • 24.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |24 CUSTOM TOGGLE SPRINGBOARD •  What is the Default ?
  • 25.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |25 CUSTOM TOGGLE SPRINGBOARD •  Use AdfmfSlidingWindowUtilities API. – oracle.adfmf.framework.api.AdfmfSlidingWindowUtilities – Note that the sliding window plugin API can only be used for features defined within the application that do not appear in the navigation bar and is not the springboard feature . – So in order to make a custom springboard that nicely slides in and out of view we need to instruct the app that it has NO springboard, and create a custom feature that functions as a springboard.
  • 26.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |26 CUSTOM TOGGLE SPRINGBOARD •  What is the Custom ?
  • 27.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DEMO 27
  • 28.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 28 6
  • 29.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | GESTURES ( AND UX ) •  Gestures can be used from: – Buttons – Links – List Item <amx:showPopupBehavior popupid="pop1" type="tapHold“ />
  • 30.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | GESTURE ABUSE •  .. Or how to confuse your app user… <amx:showPopupBehavior popupid="pop1" type=”swipeLeft“ /> <amx:actionListener binding="#{mybean.deleteRow}" type=”swipeDown"/>
  • 31.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | WHAT APPLE DID (IOS6 à IOS7) •  I rest my case…… •  Make sure to be aware of the right standard: – For Device – For OS – For version •  They changed delete swipe from right to left…….
  • 32.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THIS IS HELPFULL
  • 33.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | USE CASE EXAMPLE
  • 34.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | INGREDIENTS •  A (Web) service and datacontrol •  A Page with Listview •  An ActionListener with type SwipeDown •  Smart Java Code to call service (conditionally) <amx:listView var="row” value="#{bindings.allLocations.collectionModel}" fetchSize="#{bindings.allLocations.rangeSize}” id="lv1"> <amx:listItem id="li1"> <amx:actionListener type="swipeDown” binding="#{pageFlowScope.locationsBackingBean.checkForUpdates}”>
  • 35.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | EXAMPLE
  • 36.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | BONUS PATTERN (ACTION COMPLETE) •  Description: – User performs action – App confirms and navigates back •  Challenge: – Programmatic popup from JAVA •  Solution: – Call Javascript from Java – Invoke (Hidden) Buttons (with showPopupBehavior) from JavaScript 36 AdfmfContainerUtilities.invokeContainerJavaScriptFunction( FeatureContext.getCurrentFeatureId(), "popupUtilsShowPopup", new Object[] {"_popShowId", text}); adf.mf.api.amx.triggerBubbleEventListener(popupOpener,"tap");
  • 37.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DEMO 37
  • 38.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 38 6
  • 39.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | WHERE ARE MY LOGFILES ? •  Finding the actual log file for an app, particularly since iOS 8 and Xcode 6, is a somewhat tricky •  Logfile – application.log 39
  • 40.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THERE ARE MY LOGFILES ! •  iOS simulator content – /Users/lucbors/Library/Developer/CoreSimulator 40
  • 41.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THERE ARE MY DEVICES ! •  iOS simulator content – /Users/lucbors/Library/Developer/CoreSimulator/Devices 41
  • 42.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THERE IS MY DEVICE ! •  iOS simulator content – /Users/lucbors/Library/Developer/CoreSimulator/Devices – Use ls -lt 42
  • 43.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THERE IS MY APPLICATION ! •  iOS simulator content – /Users/lucbors/Library/Developer/CoreSimulator/Devices/ <device>/data/Containers/Data/Application 43
  • 44.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | THERE IS MY LOGFILE ! •  iOS simulator content – /Users/lucbors/Library/Developer/CoreSimulator/Devices/ <device>/data/Containers/Data/Application/<app>/Documents/ logs 44
  • 45.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | WHERE ARE MY LOGFILES ? •  Change Location 45
  • 46.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared ? 1 2 3 4 5 46 6
  • 47.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DEVICE INTERACTION •  The Device Datacontrol •  Drag n Drop support •  Attributes as fields •  Operations as buttons •  Or as a link
  • 48.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | BEHIND THE SCENES
  • 49.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | CAMERA INTERACTION •  Take a picture …………… import oracle.adf.model.datacontrols.device; DeviceManager dm = DeviceManagerFactory.getDeviceManager(); if (dm.hasCamera){ dm.getPicture( 100, DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI, DeviceManager.CAMERA_SOURCETYPE_CAMERA, false, DeviceManager.CAMERA_ENCODINGTYPE_PNG, 200, 200); } DeviceManager.CAMERA_SOURCETYPE_PHOTOLIBRARY
  • 50.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | MOBILE MAPS
  • 51.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | GOOGLE PLACES
  • 52.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | USE GPS FOR LOCATION BASED SERVICES public Location getPosition(){ DeviceManager dm=DeviceManagerFactory.getDeviceManager(); Location currentPosition = dm.getCurrentPosition( 60000,true); return currentPosition; } Location myPosition = getPosition(); String locationParameter = “location=” + myPosition.getLatitude(); +”,” + myPosition.getLongitude(); restServiceAdapter.setRequestURI( "json?” +locationParameter +”&radius=1000” +”&types=food” +”&sensor=false&key=<yourApiKey>");
  • 53.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DISPLAY ON THE MAP
  • 54.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |54 PUSH NOTIFICATIONS
  • 55.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | LOCAL NOTIFICATIONS •  Declarative – DeviceFeatures DC •  JavaScript API – adf.mf.api.localnotification •  Java API – adfmfContainerUtilities 55
  • 56.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | CREATING A LOCAL NOTIFICATION •  AdfmfContainerUtilities.addLocalNotification(options) •  AdfmfContainerUtilities.cancelLocalNotification(notificationId); 56
  • 57.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | REPEATING LOCAL NOTIFICATIONS 57
  • 58.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |58 CANCELING REPEATING NOTIFICATIONS •  Cancelling a notification means that the notification is COMPLETELY cancelled even if it was scheduled to fire every DAY •  Create a new one after cancelling
  • 59.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | DEMO 59
  • 60.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. | PROGRAM AGENDA Introducing Oracle MAF The Basics; DnD Development Device Properties, Springboard, Gestures (Common Patterns) Some Annoyances Device Interaction REST JSON : Be Prepared 1 2 3 4 5 60 6
  • 61.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |61 OVERVIEW OF A MAF SOLUTION JSONBeanSerializationHelper POJO Datacontrol Data Objects Data Objects Data ObjectsDataArray REST Adapter MAFBindingLayer RemoteRESTJSON R E S T C o n n e c t i o n MAF App
  • 62.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |62 MAF WITH REST JSON ON OSB
  • 63.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |63 CLASS HIERARCHY RestCallerUtil FlightCustURIs JsonArrayToFlightPassengerListArray JsonArrayToFlightDetailsArray FlightPassengerListArray FlightDetailsArray FlightPassengerListEntity FlightDetailsEntity FlightPassengersDC CustomerComplaintEntity FlightsRestService CustomerComplaintObject CustomerComplaintObjectToJsonObject CustomerRestService
  • 64.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |64 RESTSERVICE ADAPTER DOES THE CALL •  setRequestType – REQUEST_TYPE_GET à to GET flights and Passengers – REQUEST_TYPE_POST à to POST a complaint •  setConnectionName: To use the correct REST-connection •  setRequestURI à What is it that we want to do –  /flights/KL34 –  /flights/KL34/passengerlist –  /complaints •  NOTE: Request URI are bundled in a Custom Class (FlightCustURIs)
  • 65.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |65 DEMO WITHOUT THE OSB { "FlightCode": { "CarrierCode": "KL", "FlightNumber": "34" }, "FlightDate": "2015-03-07T09:50:00.000+01:0 "TotalNumberOfPassengers": "22", "Passengers": [ { "FirstName": "Diana", "LastName": "Woodstock", "Country": "UK", "FrequentFlyerNumber": "BB123332", "Seat": "2B" }, { "FirstName": "William", "LastName": "Simon", "Country": "US", "FrequentFlyerNumber": "KK9182673", "Seat": "4C" },
  • 66.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |66 SUMMARY •  Many Options to Develop •  Many Features to Use •  Highly Configurable •  Use Common Patterns
  • 68.
    Copyright © 2014,eProseed and/or its affiliates. All rights reserved. |