SlideShare a Scribd company logo
1 of 51
Download to read offline
Luc Bors, june 2013, ODTUG KScope 2013 New Orleans
Best Practices for Developing Applications
with Oracle ADF Mobile
Oracle ADF Mobile
Who Am I
•  Luc Bors
•  Principal Consultant
•  AMIS Nieuwegein Netherlands
•  Friends of Oracle & Java
•  5 Oracle ACE(D)
•  Oracle Partner
ADF Mobile Overview
17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
Device
Services
How It Works?
Phone Gap
Device Native Container
Web
View
Server
HTML
ADF Mobile
XML View
Java
Managed Beans
ADF Model
Third Party
Web Sites
ADF Faces RC
ADF Mobile
Browser
Mobile
Device
Web Services
(SOAP & REST)
Local
HTML
HTML5 & JavaScript
Configuration
Server
ADF Controller
Local'Data'
CredentialManagement,
SSO&AccessControl
Application
Configuration
Server
ADF mobile vs. Vanilla ADF
•  The Obvious Differences
•  The Annoying Differences
•  The Not so Obvious Differences
•  The Nice Differences
The Obvious Differences
•  Mobile
•  Multiple Platforms
•  Multiple Form Factors
•  Touchscreens
What Device are you on ?
•  Device info	

	

•  Device Properties
Work With Form Factors
•  Respond to Form Factors
•  Conditionally Render Different content
Demo
Using the mouse for…..
•  Clicking Menu Items
•  Clicking Links & Buttons
•  Expanding / Collapsing
•  Selecting / Deselecting
Gesture Support
•  You can configure Button, Link, and List Item components to react to the
following gestures:
•  Swipe to the right
•  Swipe to the left
•  Swipe up
•  Swipe down
•  Tap-and-hold
Gesture examples
•  The Swipe Gesture
•  The Tap Gesture
<amx:actionListener binding="#{mybean.DoX}"
type="swipeRight"/>
<amx:showPopupBehavior popupid="pop1"
type="tapHold“ />
Annoying differences
A simple calculator….
•  In Vanilla ADF…… •  InputText for Value
•  Autosubmit
•  OutputText for Result
•  PartialTriggers
•  Managed Bean
•  Holds the values
This is annoying….
•  ADF Mobile
•  Autosubmit and PartialTriggers does not exist !
•  2 Options
I.  Use application Scoped Variables (no Coding)
•  Not meant for this purpose
II.  Use the Property Change Listener Pattern
PropertyChangeSupport
The not so obvious ones
•  No menu structure…..
•  What about Application Start ?
•  What about Navigation ?
•  No ADF Business Components
•  Now what ?
Springboard & navigationbar
•  Springboard configuration in adfmf-application.xml
The Default Springboard
The Custom SpringBoard
Configuring the springboard
Using the Local Database
Creating the Local Database
Register Listener
Using the POJO Datacontrol
Talking to the DB (Select)
Talking to the DB (DML…)
Using Webservices
•  Create a Webserivce Datacontrol
Using Webservices (1)
•  Just drag & drop the method from the Data Control
Using Webservices (1)
•  The PageDefinition File
•  The PageDefinition
Using Webservices (2)
•  Invoke directly from java.
•  Does not use the binding layer
•  Uses Framework utilityMethod
•  AdfmfJavaUtilities.invokeDataControlMethod()
•  Datacontrol must be in available in DataBindings.cpx
Advice
•  Do Not Hook Up Webservices Directly to Your Page
–  Use Multiple Layers of Datacontrols For Abstraction
–  You are in control
Demo
Use Caching
•  By default the webservice will be called on every request
•  Simply compare if what is in memory is the same as what needs to be
shown.
if (!s_locationsList.isEmpty()){
MyLocation cur = (MyLocation)s_locationsList.get(0);
Integer currentLoc = cur.getId();
if (currentLoc.compareTo(Integer.valueOf(<NEWVALUE>))!=0){
// clear cache
callWebservice();
}
}
The return of the invokeAction
•  The current row in ADF Mobile is not preserved across pages that bind to
the same data collection
•  Steps:
–  Inside the <amx:listItem> element of the list page, you need to add a
<amx:setPropertyListener> element to store the row key in a pageFlowScope
variable.
–  In the page definition of the detail page, you need to add a setCurrentRowWithKey
action, which uses the pageFlowScope variable to set the current row.
–  In the page definition of the detail page, you need to add an invokeAction
executable for the setCurrentRowWithKey action to ensure the current row is
automatically set when entering the detail page.
–  http://www.ateam-oracle.com/adf-mobile-preserving-the-current-row-across-pages/
The Nice Differences
•  Device Interaction
•  Thematic Maps
Device Interaction
•  The Device Datacontrol
•  Drag n Drop support
•  Attributes as fields
•  Operations as buttons
Camera interaction
•  Take a picture ……………
•  …… or get one from the Library
import oracle.adf.model.datacontrols.device;
DeviceManagerFactory.getDeviceManager().getPicture(100,
DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI,
DeviceManager.CAMERA_SOURCETYPE_CAMERA, false,
DeviceManager.CAMERA_ENCODINGTYPE_PNG,
0,
0);
DeviceManager.CAMERA_SOURCETYPE__PHOTOLIBRARY
Be careful !!
•  DESTINATIONTYPE_DATA_URL you will get the image as base64 encoded
string
•  Camera’s are very good.
•  Picture quality is amazing.
–  Encoding such images as base64 causes memory issues
•  Don’t blow up your app.
–  iOS you should set quality parameter to a value less then 50 to avoid
–  On Android out-of-memory can be caused with default image settings. Make
image smaller by setting targetWidth and targetHeight
Demo
I wish ADF could do this
Custom Thematic Map
•  Configuration File
•  Custom Image
Custom Thematic Map
Custom Thematic Map
Demo
Summary
•  Today was about differences
•  Know the differences
•  Know the ADF Mobile way to do it
•  There are many parallels
•  Developing ‘feels’ like Vanilla ADF
•  Component Based Developement
•  ADF ‘like’ config files
•  DataControl / DataBinding
•  My advise
•  Use ADF Mobile like ADF
•  Know The DataControl by heart
•  Know how to use Multiple (levels) of Datacontrols
•  Use Java; it is more flexible then declarative
Questions ?
Luc Bors, AMIS, The Netherlands	

Luc.Bors@amis.nl	

LucBors@gmail.com	

Follow me on : @lucb_

More Related Content

What's hot

An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
Kevin Decker
 
Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overview
Alan Mendelevich
 

What's hot (19)

Beginning jQuery Mobile
Beginning jQuery MobileBeginning jQuery Mobile
Beginning jQuery Mobile
 
An Introduction to webOS
An Introduction to webOSAn Introduction to webOS
An Introduction to webOS
 
SPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuideSPSNH 2014 - The SharePoint & jQueryGuide
SPSNH 2014 - The SharePoint & jQueryGuide
 
Visualforce
VisualforceVisualforce
Visualforce
 
Azure Mobile Apps with Xamarin
Azure Mobile Apps with XamarinAzure Mobile Apps with Xamarin
Azure Mobile Apps with Xamarin
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScript
 
Collection view layout
Collection view layoutCollection view layout
Collection view layout
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery librariesTulsaTechFest - Maximize SharePoint UX with free jQuery libraries
TulsaTechFest - Maximize SharePoint UX with free jQuery libraries
 
AtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using nowAtlasCamp 2015: Web technologies you should be using now
AtlasCamp 2015: Web technologies you should be using now
 
Android UI Development
Android UI DevelopmentAndroid UI Development
Android UI Development
 
Windows phone app development overview
Windows phone app development overviewWindows phone app development overview
Windows phone app development overview
 
Build your Business Services using ADF Task Flows
Build your Business Services using ADF Task FlowsBuild your Business Services using ADF Task Flows
Build your Business Services using ADF Task Flows
 
EmberJS BucharestJS
EmberJS BucharestJSEmberJS BucharestJS
EmberJS BucharestJS
 
AtlasCamp 2015: Connect everywhere - Cloud and Server
AtlasCamp 2015: Connect everywhere - Cloud and ServerAtlasCamp 2015: Connect everywhere - Cloud and Server
AtlasCamp 2015: Connect everywhere - Cloud and Server
 
Advanced Core Data - The Things You Thought You Could Ignore
Advanced Core Data - The Things You Thought You Could IgnoreAdvanced Core Data - The Things You Thought You Could Ignore
Advanced Core Data - The Things You Thought You Could Ignore
 
Developing Applications for WebOS
Developing Applications for WebOSDeveloping Applications for WebOS
Developing Applications for WebOS
 
Unobtrusive JavaScript
Unobtrusive JavaScriptUnobtrusive JavaScript
Unobtrusive JavaScript
 
AtlasCamp 2015: Using add-ons to build add-ons
AtlasCamp 2015: Using add-ons to build add-onsAtlasCamp 2015: Using add-ons to build add-ons
AtlasCamp 2015: Using add-ons to build add-ons
 

Similar to ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile - Luc Bors

Windows Phone 7 and Windows Azure – A Match Made in the Cloud
Windows Phone 7 and Windows Azure – A Match Made in the CloudWindows Phone 7 and Windows Azure – A Match Made in the Cloud
Windows Phone 7 and Windows Azure – A Match Made in the Cloud
Michael Collier
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
Andrew Ferrier
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
Mihail Mateev
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
Jia Mi
 

Similar to ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile - Luc Bors (20)

ADF Mobile: 10 Things you don't get from the developers guide - Luc Bors
ADF Mobile: 10 Things you don't get from the developers guide - Luc BorsADF Mobile: 10 Things you don't get from the developers guide - Luc Bors
ADF Mobile: 10 Things you don't get from the developers guide - Luc Bors
 
ADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guideADF Mobile: 10 Things you don't get from the developers guide
ADF Mobile: 10 Things you don't get from the developers guide
 
Building Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on AzureBuilding Mobile Web Apps with jQM and Cordova on Azure
Building Mobile Web Apps with jQM and Cordova on Azure
 
Browser Developer Tools for APEX Developers
Browser Developer Tools for APEX DevelopersBrowser Developer Tools for APEX Developers
Browser Developer Tools for APEX Developers
 
Cross platform mobile app development with Xamarin
Cross platform mobile app development with XamarinCross platform mobile app development with Xamarin
Cross platform mobile app development with Xamarin
 
Dreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile designDreamweaver CS6, jQuery, PhoneGap, mobile design
Dreamweaver CS6, jQuery, PhoneGap, mobile design
 
App innovationcircles xamarin
App innovationcircles xamarinApp innovationcircles xamarin
App innovationcircles xamarin
 
Hybrid application development
Hybrid application developmentHybrid application development
Hybrid application development
 
The Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devicesThe Mobile Web - HTML5 on mobile devices
The Mobile Web - HTML5 on mobile devices
 
Angular mobile angular_u
Angular mobile angular_uAngular mobile angular_u
Angular mobile angular_u
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Windows Phone 7 and Windows Azure – A Match Made in the Cloud
Windows Phone 7 and Windows Azure – A Match Made in the CloudWindows Phone 7 and Windows Azure – A Match Made in the Cloud
Windows Phone 7 and Windows Azure – A Match Made in the Cloud
 
Building Real World Applications using Windows Azure - Scott Guthrie, 2nd Dec...
Building Real World Applications using Windows Azure - Scott Guthrie, 2nd Dec...Building Real World Applications using Windows Azure - Scott Guthrie, 2nd Dec...
Building Real World Applications using Windows Azure - Scott Guthrie, 2nd Dec...
 
Building azure applications ireland
Building azure applications irelandBuilding azure applications ireland
Building azure applications ireland
 
Real-world Dojo Mobile
Real-world Dojo MobileReal-world Dojo Mobile
Real-world Dojo Mobile
 
Win j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateevWin j svsphonegap-damyan-petev-mihail-mateev
Win j svsphonegap-damyan-petev-mihail-mateev
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
 
John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)John Resig Beijing 2010 (English Version)
John Resig Beijing 2010 (English Version)
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 

More from Getting value from IoT, Integration and Data Analytics

More from Getting value from IoT, Integration and Data Analytics (20)

AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: Custom Application ...
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaSAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 2: SaaS
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: DataAMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Data
 
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
AMIS Oracle OpenWorld en Code One Review 2018 - Pillar 1: Cloud Infrastructure
 
10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel10 tips voor verbetering in je Linkedin profiel
10 tips voor verbetering in je Linkedin profiel
 
Iot in de zorg the next step - fit for purpose
Iot in de zorg   the next step - fit for purpose Iot in de zorg   the next step - fit for purpose
Iot in de zorg the next step - fit for purpose
 
Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct Iot overview .. Best practices and lessons learned by Conclusion Conenct
Iot overview .. Best practices and lessons learned by Conclusion Conenct
 
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect IoT Fit for purpose - how to be successful in IOT Conclusion Connect
IoT Fit for purpose - how to be successful in IOT Conclusion Connect
 
Industry and IOT Overview of protocols and best practices Conclusion Connect
Industry and IOT Overview of protocols and best practices  Conclusion ConnectIndustry and IOT Overview of protocols and best practices  Conclusion Connect
Industry and IOT Overview of protocols and best practices Conclusion Connect
 
IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...IoT practical case using the people counter sensing traffic density build usi...
IoT practical case using the people counter sensing traffic density build usi...
 
R introduction decision_trees
R introduction decision_treesR introduction decision_trees
R introduction decision_trees
 
Introduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas JellemaIntroduction overviewmachinelearning sig Door Lucas Jellema
Introduction overviewmachinelearning sig Door Lucas Jellema
 
IoT and the Future of work
IoT and the Future of work IoT and the Future of work
IoT and the Future of work
 
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
Oracle OpenWorld 2017 Review (31st October 2017 - 250 slides)
 
Ethereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter ReitsmaEthereum smart contracts - door Peter Reitsma
Ethereum smart contracts - door Peter Reitsma
 
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - ConclusionBlockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
Blockchain - Techniek en usecases door Robert van Molken - AMIS - Conclusion
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
 
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
Internet of Things propositie - Enterprise IOT - AMIS - Conclusion
 
Omc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van SoestOmc AMIS evenement 26012017 Dennis van Soest
Omc AMIS evenement 26012017 Dennis van Soest
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile - Luc Bors

  • 1. Luc Bors, june 2013, ODTUG KScope 2013 New Orleans Best Practices for Developing Applications with Oracle ADF Mobile Oracle ADF Mobile
  • 2. Who Am I •  Luc Bors •  Principal Consultant •  AMIS Nieuwegein Netherlands •  Friends of Oracle & Java •  5 Oracle ACE(D) •  Oracle Partner
  • 3. ADF Mobile Overview 17 Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Device Services How It Works? Phone Gap Device Native Container Web View Server HTML ADF Mobile XML View Java Managed Beans ADF Model Third Party Web Sites ADF Faces RC ADF Mobile Browser Mobile Device Web Services (SOAP & REST) Local HTML HTML5 & JavaScript Configuration Server ADF Controller Local'Data' CredentialManagement, SSO&AccessControl Application Configuration Server
  • 4. ADF mobile vs. Vanilla ADF •  The Obvious Differences •  The Annoying Differences •  The Not so Obvious Differences •  The Nice Differences
  • 5. The Obvious Differences •  Mobile •  Multiple Platforms •  Multiple Form Factors •  Touchscreens
  • 6. What Device are you on ? •  Device info •  Device Properties
  • 7. Work With Form Factors •  Respond to Form Factors •  Conditionally Render Different content
  • 9. Using the mouse for….. •  Clicking Menu Items •  Clicking Links & Buttons •  Expanding / Collapsing •  Selecting / Deselecting
  • 10. Gesture Support •  You can configure Button, Link, and List Item components to react to the following gestures: •  Swipe to the right •  Swipe to the left •  Swipe up •  Swipe down •  Tap-and-hold
  • 11. Gesture examples •  The Swipe Gesture •  The Tap Gesture <amx:actionListener binding="#{mybean.DoX}" type="swipeRight"/> <amx:showPopupBehavior popupid="pop1" type="tapHold“ />
  • 12.
  • 14. A simple calculator…. •  In Vanilla ADF…… •  InputText for Value •  Autosubmit •  OutputText for Result •  PartialTriggers •  Managed Bean •  Holds the values
  • 15. This is annoying…. •  ADF Mobile •  Autosubmit and PartialTriggers does not exist ! •  2 Options I.  Use application Scoped Variables (no Coding) •  Not meant for this purpose II.  Use the Property Change Listener Pattern
  • 17.
  • 18. The not so obvious ones •  No menu structure….. •  What about Application Start ? •  What about Navigation ? •  No ADF Business Components •  Now what ?
  • 19. Springboard & navigationbar •  Springboard configuration in adfmf-application.xml
  • 23.
  • 24. Using the Local Database
  • 25. Creating the Local Database
  • 27. Using the POJO Datacontrol
  • 28. Talking to the DB (Select)
  • 29. Talking to the DB (DML…)
  • 30.
  • 31. Using Webservices •  Create a Webserivce Datacontrol
  • 32. Using Webservices (1) •  Just drag & drop the method from the Data Control
  • 33. Using Webservices (1) •  The PageDefinition File •  The PageDefinition
  • 34. Using Webservices (2) •  Invoke directly from java. •  Does not use the binding layer •  Uses Framework utilityMethod •  AdfmfJavaUtilities.invokeDataControlMethod() •  Datacontrol must be in available in DataBindings.cpx
  • 35. Advice •  Do Not Hook Up Webservices Directly to Your Page –  Use Multiple Layers of Datacontrols For Abstraction –  You are in control
  • 36. Demo
  • 37. Use Caching •  By default the webservice will be called on every request •  Simply compare if what is in memory is the same as what needs to be shown. if (!s_locationsList.isEmpty()){ MyLocation cur = (MyLocation)s_locationsList.get(0); Integer currentLoc = cur.getId(); if (currentLoc.compareTo(Integer.valueOf(<NEWVALUE>))!=0){ // clear cache callWebservice(); } }
  • 38. The return of the invokeAction •  The current row in ADF Mobile is not preserved across pages that bind to the same data collection •  Steps: –  Inside the <amx:listItem> element of the list page, you need to add a <amx:setPropertyListener> element to store the row key in a pageFlowScope variable. –  In the page definition of the detail page, you need to add a setCurrentRowWithKey action, which uses the pageFlowScope variable to set the current row. –  In the page definition of the detail page, you need to add an invokeAction executable for the setCurrentRowWithKey action to ensure the current row is automatically set when entering the detail page. –  http://www.ateam-oracle.com/adf-mobile-preserving-the-current-row-across-pages/
  • 39. The Nice Differences •  Device Interaction •  Thematic Maps
  • 40. Device Interaction •  The Device Datacontrol •  Drag n Drop support •  Attributes as fields •  Operations as buttons
  • 41. Camera interaction •  Take a picture …………… •  …… or get one from the Library import oracle.adf.model.datacontrols.device; DeviceManagerFactory.getDeviceManager().getPicture(100, DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI, DeviceManager.CAMERA_SOURCETYPE_CAMERA, false, DeviceManager.CAMERA_ENCODINGTYPE_PNG, 0, 0); DeviceManager.CAMERA_SOURCETYPE__PHOTOLIBRARY
  • 42. Be careful !! •  DESTINATIONTYPE_DATA_URL you will get the image as base64 encoded string •  Camera’s are very good. •  Picture quality is amazing. –  Encoding such images as base64 causes memory issues •  Don’t blow up your app. –  iOS you should set quality parameter to a value less then 50 to avoid –  On Android out-of-memory can be caused with default image settings. Make image smaller by setting targetWidth and targetHeight
  • 43. Demo
  • 44. I wish ADF could do this
  • 45. Custom Thematic Map •  Configuration File •  Custom Image
  • 48. Demo
  • 49. Summary •  Today was about differences •  Know the differences •  Know the ADF Mobile way to do it •  There are many parallels •  Developing ‘feels’ like Vanilla ADF •  Component Based Developement •  ADF ‘like’ config files •  DataControl / DataBinding •  My advise •  Use ADF Mobile like ADF •  Know The DataControl by heart •  Know how to use Multiple (levels) of Datacontrols •  Use Java; it is more flexible then declarative
  • 51. Luc Bors, AMIS, The Netherlands Luc.Bors@amis.nl LucBors@gmail.com Follow me on : @lucb_