SlideShare a Scribd company logo
Implementing Data Caching 
and Data Syncing using 
Oracle Mobile Application 
Framework (MAF) 
Steven Davelaar 
Oracle Mobile A-Team 
Oracle Corporation 
@stevendavelaar 
Copyright © 2013, Oracle and/or its affiliates. All 1 rights reserved.
Agenda 
 Quick Intro to Oracle MAF 
 Designing a Mobile-Optimized API 
– On-demand loading versus data caching 
 Using A-Team Mobile Persistence Accelerator 
– Implementing Data Caching 
– Implementing Data Syncing 
Copyright © 2013, Oracle and/or its affiliates. All 2 rights reserved.
Oracle Mobile Application Framework 
Productivity boosting mobile development framework 
 Build Once, Run on Multiple-Platforms 
 Simpler UI development 
 Java, JavaScript, and HTML5-based 
application development 
 Choice of development tools 
 Offline-capable: SQLite with Encryption 
 Full Access to Native Device Features 
 Modular, Reusable Components 
Copyright © 2013, Oracle and/or its affiliates. All 3 rights reserved.
Business Logic Development 
Access and Process Application Data 
 Code logic with Java 
 Lightweight JVM 
 Native library on device 
Copyright © 2013, Oracle and/or its affiliates. All 4 rights reserved.
UI Implementation Options in Oracle MAF 
 Component based page definition 
– AMX Components 
 Programmatic HTML5 
– with any third-party HTML5 frameworks 
 Remote URL 
– Any server-side HTML 
Copyright © 2013, Oracle and/or its affiliates. All 5 rights reserved.
Extend and Expand 
Add capabilities to the framework 
Cordova Plug-in Support 
– Add functionality such as barcode scanning, 
NFC, geo-fencing, etc. 
– Cross platform 
Custom AMX Component Support 
– Allows developer to add custom UI 
components to the framework 
Copyright © 2013, Oracle and/or its affiliates. All 6 rights reserved.
Oracle MAF Architecture 
Device Native Container 
HTML5  JavaScript Presentation 
PhoneGap/ 
Cordova 
Device 
Services 
Copyright © 2013, Oracle and/or its affiliates. All 7 rights reserved. 
Web 
View 
Server 
HTML 
ADF Mobile 
AMX View 
Oracle IDM 
Oracle IAM 
Third Party 
Web Sites 
Server or Cloud 
backend 
Mobile 
Device 
Local 
HTML 
Configuration 
Server 
ADF Controller 
Credential Management, 
SSO  Access Control 
App 
Config 
Server 
SOAP  REST 
Web Services 
Java VM 
Business 
Logic 
ADF Model 
Encrypted 
SQLite DB 
JDBC 
SQLite
Oracle MAF Architecture 
Device Native Container 
HTML5  JavaScript Presentation 
PhoneGap/ 
Cordova 
Device 
Services 
Copyright © 2013, Oracle and/or its affiliates. All 8 rights reserved. 
Web 
View 
Server 
HTML 
ADF Mobile 
AMX View 
Oracle IDM 
Oracle IAM 
Third Party 
Web Sites 
Server or Cloud 
backend 
Mobile 
Device 
Local 
HTML 
Configuration 
Server 
ADF Controller 
Credential Management, 
SSO  Access Control 
App 
Config 
Server 
SOAP  REST 
Web Services 
Java VM 
Business 
Logic 
ADF Model 
Encrypted 
SQLite DB 
JDBC 
SQLite
Agenda 
 Quick Intro to Oracle MAF 
 Designing a Mobile-Optimized API 
– On-demand loading versus data caching 
 Using A-Team Mobile Persistence Accelerator 
– Implementing Data Caching 
– Implementing Data Syncing 
Copyright © 2013, Oracle and/or its affiliates. All 9 rights reserved.
What is a Mobile API? 
 API = Application Programming Interface 
 The API is typically hosted on a remote server (on-premise) or in the 
cloud 
 The mobile app typically accesses the API over HTTP using SOAP or 
RESTful web services 
Copyright © 2013, Oracle and/or its affiliates. All 10 rights reserved. 
1
What is a Mobile-Optimized API? 
 A mobile-optimized API uses RESTful services with JSON payload 
– Easy, flexible, performant, de facto standard 
– SOAP-XML creates larger payloads and is slower to process 
 A mobile-optimized API is designed with mobile app in mind 
– Returns clean payloads that are fit for purpose 
– Supports required data caching and offline use case scenarios 
 Existing back-end system API’s are typically NOT mobile-optimized 
Copyright © 2013, Oracle and/or its affiliates. All 11 rights reserved. 
1
Designing a Mobile-Optimized HR API 
Copyright © 2013, Oracle and/or its affiliates. All 12 rights reserved.
Designing a Mobile-Optimized HR API 
 Design optimized for on-demand data loading 
– Get list of departments with only id and name 
– Get details of one department with summary list of employees 
– Get details of one employee 
 Design optimized for data caching / offline usage 
– Get list of departments and its employees with all attributes 
 Mobile-optimized API needs to be flexible to support both scenarios! 
Copyright © 2013, Oracle and/or its affiliates. All 13 rights reserved.
Designing a Mobile-Optimized API 
 The mobile developer should drive API design 
– knows the supported form factors and which data is needed for which 
screen. 
– knows the requirements for offline mode, and how mobile development tool 
set supports and implements this. 
– designs data caching strategies for performance optimizations 
– decides which read and write actions can be performed in background 
thread not impacting user-perceived performance. 
Copyright © 2013, Oracle and/or its affiliates. All 14 rights reserved.
Implementing a Mobile-Optimized API 
 Use OSB to transform backend (SOAP) services to mobile API 
 Use mock-up API to enable parallel development 
– Easy and fast with tools like MongoDB, Node.js, Express 
 A-Team article series “Creating a Mobile-Optimized REST API Using 
Oracle Service Bus” 
– http://www.ateam-oracle.com/?cat=151 
Copyright © 2013, Oracle and/or its affiliates. All 15 rights reserved.
Agenda 
 Quick Intro to Oracle MAF 
 Designing a Mobile-Optimized API 
– On-demand loading versus data caching 
 Using A-Team Mobile Persistence Accelerator 
– Implementing Data Caching 
– Implementing Data Syncing 
Copyright © 2013, Oracle and/or its affiliates. All 16 rights reserved.
A-Team Mobile Persistence Accelerator (AMPA) 
 Lightweight persistence framework that works on top of MAF 
 Declarative consumption of REST-JSON services 
 Significantly speeds up implementation of data caching and data 
synching 
 Available as open source framework hosted on GitHub 
 Provided “as-is”, no support, no updates from Oracle 
 Ideas and features from this project will be included in the MAF 
product over time. 
Copyright © 2013, Oracle and/or its affiliates. All 17 rights reserved.
AMPA – Project mobile-persistence on GitHub 
Copyright © 2013, Oracle and/or its affiliates. All 18 rights reserved.
Runtime Persistence Architecture 
MAF Model 
Copyright © 2013, Oracle and/or its affiliates. All 21 rights reserved. 
DepartmentService 
Data Control 
EntityCRUDService 
extends 
SQLite 
DepartmentService 
uses 
Department 
Persistence 
Mapping XML 
DEPARTMENTS 
table 
references 
DBPersistence 
Manager 
JDBC 
Statements 
REST-JSON 
PersistenceManager 
HTTP 
Requests 
REST(JSON/XML)
AMPA - JDeveloper Wizards 
 Three wizard are provided to create the artefacts needed for this 
runtime persistence architecture: 
– Mobile Business Objects From Web Service Data Control Wizard 
– Mobile Business Objects From REST Web Service Wizard 
– Mobile Business Objects From Database Tables (Local persistence only) 
 Another wizard is provided to generate a default CRUD user interface 
on top of the business layer created by one of the above wizards. 
Copyright © 2013, Oracle and/or its affiliates. All 22 rights reserved.
Rest Wizard Demo - Toplink Data Services 
M/ToplinkRest/persistence/v1.0/Model1/query/Department.findAll 
Copyright © 2013, Oracle and/or its affiliates. All 23 rights reserved.
Demo: 
Building Mobile Application – Model layer 
Including data caching, offline usage and data synchronization 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 
Oracle 2
Configured InitDBLifecycleListener 
Copyright © 2013, Oracle and/or its affiliates. All 63 rights reserved.
Create Data Control For Service Classes 
Copyright © 2013, Oracle and/or its affiliates. All 64 rights reserved.
Creating the Mobile User Interface 
Two Options 
 Build Using Drag and Drop 
from DataControl Palette 
 Generate Using MAF User 
Interface Generator 
Wizard 
Copyright © 2013, Oracle and/or its affiliates. All 65 rights reserved.
Building the User Interface 
Copyright © 2013, Oracle and/or its affiliates. All 66 rights reserved.
Building the User Interface 
Copyright © 2013, Oracle and/or its affiliates. All 67 rights reserved.
Building the User Interface 
Copyright © 2013, Oracle and/or its affiliates. All 68 rights reserved.
Demo: 
Building Mobile Application – UI layer 
Including data caching, offline usage and data synchronization 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 
6
Using the MAF User Interface Generator 
Copyright © 2013, Oracle and/or its affiliates. All 70 rights reserved.
Using the MAF User Interface Generator 
Copyright © 2013, Oracle and/or its affiliates. All 71 rights reserved.
Generated User Interface Artefacts 
Copyright © 2013, Oracle and/or its affiliates. All 72 rights reserved.
AMPA - Offline Writes and Data Syncing 
 If a remote persistence manager is configured, and CUD service call 
fails, the service call is registered as “pending” data synch action 
– Failure reason registered (device offline, service not available, etc) 
 On next service call, the pending synch actions are processed first in 
order of creation 
– When failing again, the still pending synch action is updated with date of 
last synch attempt and last error message 
 Out-of-the-box feature: NO Java coding required 
Copyright © 2013, Oracle and/or its affiliates. All 73 rights reserved.
Viewing Pending Data Sync Actions 
 A reusable “DataSync” feature is provided that can be added to your 
mobile application 
 Register the feature in adfmf-application.xml 
Copyright © 2013, Oracle and/or its affiliates. All 74 rights reserved.
Viewing Pending Data Sync Actions 
 Add a button that navigates to the data sync feature 
Copyright © 2013, Oracle and/or its affiliates. All 75 rights reserved.
Demo: 
Offline transactions and data syncing 
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 
7
Viewing Pending Data Synch Actions 
Copyright © 2013, Oracle and/or its affiliates. All 77 rights reserved.
Notes on Data Sync Functionality 
 Pending changes can become obsolete because of updates in server 
data by other clients 
– The server–side code should identify this and throw an error when the data 
sync action sends stale data 
– Stale data detection can be done by including a data revision number or 
‘last-modified” timestamp in payload. This number or timestamp should 
match with server-side data record 
 Data sync actions that keep failing need to be removed manually 
– Local database might be out-of-sync, app needs to offer reconcile action 
Copyright © 2013, Oracle and/or its affiliates. All 78 rights reserved.
Other Runtime Persistence Features 
 Encryption of database 
 Auto-cleaning of unused database segments 
 Lazy loading of child collections (a.k.a “Indirection”) 
 Entity caching to minimize object creation 
 Supports server-derived primary keys 
 FindEntityByKey 
– Checks cache first, then database 
 Designed for customization 
– Easy to override and extend default behavior 
Copyright © 2013, Oracle and/or its affiliates. All 79 rights reserved.
AMPA - More Info 
 A-Team Chronicles: http://www.ateam-oracle.com/?p=29192 
 Includes download links to 
– Source code on GitHub 
– Videos 
– Demo applications 
Copyright © 2013, Oracle and/or its affiliates. All 80 rights reserved.
Summary 
 Start with designing and implementing a mobile-optimized REST API 
 Use AMPA to declaratively consume the REST/JSON web services 
 Use AMPA to implement data caching and syncing using the on-device 
SQLite database 
 Think about how your end users should handle failed data sync 
actions, and how to prevent updates based on stale data 
Copyright © 2013, Oracle and/or its affiliates. All 81 rights reserved.
Copyright © 2013, Oracle and/or its affiliates. All 82 rights reserved.

More Related Content

What's hot

Oracle ADF Architecture TV - Design - Application Customization and MDS
Oracle ADF Architecture TV - Design - Application Customization and MDSOracle ADF Architecture TV - Design - Application Customization and MDS
Oracle ADF Architecture TV - Design - Application Customization and MDS
Chris Muir
 
Oracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service ArchitecturesOracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service Architectures
Chris Muir
 
Let's Talk Mobile
Let's Talk MobileLet's Talk Mobile
Let's Talk Mobile
Chris Muir
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
Steven Davelaar
 
Oracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration ArchitecturesOracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration Architectures
Chris Muir
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Chris Muir
 
Oracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow OverviewOracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow Overview
Chris Muir
 
Data Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application FrameworkData Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application Framework
andrejusb
 
Oracle ADF Architecture TV - Design - Usability and Layout Design
Oracle ADF Architecture TV - Design - Usability and Layout DesignOracle ADF Architecture TV - Design - Usability and Layout Design
Oracle ADF Architecture TV - Design - Usability and Layout Design
Chris Muir
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error Handling
Chris Muir
 
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with OracleMobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Chris Muir
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Chris Muir
 
Oracle ADF Architecture TV - Development - Performance & Tuning
Oracle ADF Architecture TV - Development - Performance & TuningOracle ADF Architecture TV - Development - Performance & Tuning
Oracle ADF Architecture TV - Development - Performance & Tuning
Chris Muir
 
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope OptionsOracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Chris Muir
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Chris Muir
 
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication PatternOracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
Chris Muir
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
Chris Muir
 
Oracle ADF Architecture TV - Deployment - Deployment Options
Oracle ADF Architecture TV - Deployment - Deployment OptionsOracle ADF Architecture TV - Deployment - Deployment Options
Oracle ADF Architecture TV - Deployment - Deployment Options
Chris Muir
 
Oracle ADF Architecture TV - Design - ADF Architectural Patterns
Oracle ADF Architecture TV - Design - ADF Architectural PatternsOracle ADF Architecture TV - Design - ADF Architectural Patterns
Oracle ADF Architecture TV - Design - ADF Architectural Patterns
Chris Muir
 
Oracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for SecurityOracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for Security
Chris Muir
 

What's hot (20)

Oracle ADF Architecture TV - Design - Application Customization and MDS
Oracle ADF Architecture TV - Design - Application Customization and MDSOracle ADF Architecture TV - Design - Application Customization and MDS
Oracle ADF Architecture TV - Design - Application Customization and MDS
 
Oracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service ArchitecturesOracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service Architectures
 
Let's Talk Mobile
Let's Talk MobileLet's Talk Mobile
Let's Talk Mobile
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
 
Oracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration ArchitecturesOracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration Architectures
 
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project LayoutsOracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
Oracle ADF Architecture TV - Development - Naming Conventions & Project Layouts
 
Oracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow OverviewOracle ADF Architecture TV - Design - Task Flow Overview
Oracle ADF Architecture TV - Design - Task Flow Overview
 
Data Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application FrameworkData Caching Strategies for Oracle Mobile Application Framework
Data Caching Strategies for Oracle Mobile Application Framework
 
Oracle ADF Architecture TV - Design - Usability and Layout Design
Oracle ADF Architecture TV - Design - Usability and Layout DesignOracle ADF Architecture TV - Design - Usability and Layout Design
Oracle ADF Architecture TV - Design - Usability and Layout Design
 
Oracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error HandlingOracle ADF Architecture TV - Development - Error Handling
Oracle ADF Architecture TV - Development - Error Handling
 
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with OracleMobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
Mobile Mumbo Jumbo - Demystifying the World of Enterprise Mobility with Oracle
 
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction OptionsOracle ADF Architecture TV - Design - Task Flow Transaction Options
Oracle ADF Architecture TV - Design - Task Flow Transaction Options
 
Oracle ADF Architecture TV - Development - Performance & Tuning
Oracle ADF Architecture TV - Development - Performance & TuningOracle ADF Architecture TV - Development - Performance & Tuning
Oracle ADF Architecture TV - Development - Performance & Tuning
 
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope OptionsOracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
Oracle ADF Architecture TV - Design - Task Flow Data Control Scope Options
 
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable ArtifactsOracle ADF Architecture TV - Design - ADF Reusable Artifacts
Oracle ADF Architecture TV - Design - ADF Reusable Artifacts
 
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication PatternOracle ADF Architecture TV - Design - Task Flow Communication Pattern
Oracle ADF Architecture TV - Design - Task Flow Communication Pattern
 
Oracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best PracticesOracle ADF Architecture TV - Development - Programming Best Practices
Oracle ADF Architecture TV - Development - Programming Best Practices
 
Oracle ADF Architecture TV - Deployment - Deployment Options
Oracle ADF Architecture TV - Deployment - Deployment OptionsOracle ADF Architecture TV - Deployment - Deployment Options
Oracle ADF Architecture TV - Deployment - Deployment Options
 
Oracle ADF Architecture TV - Design - ADF Architectural Patterns
Oracle ADF Architecture TV - Design - ADF Architectural PatternsOracle ADF Architecture TV - Design - ADF Architectural Patterns
Oracle ADF Architecture TV - Design - ADF Architectural Patterns
 
Oracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for SecurityOracle ADF Architecture TV - Design - Designing for Security
Oracle ADF Architecture TV - Design - Designing for Security
 

Viewers also liked

Offline Application Cache
Offline Application CacheOffline Application Cache
Offline Application CacheJonathan Stark
 
Offline Strategy for an Online World
Offline Strategy for an Online WorldOffline Strategy for an Online World
Offline Strategy for an Online World
SoCal UX Camp
 
Offnet- Offline Mobile Application
Offnet- Offline Mobile ApplicationOffnet- Offline Mobile Application
Offnet- Offline Mobile Application
Sudip Adhikari
 
Designing For Offline
Designing For OfflineDesigning For Offline
Designing For Offline
Steven Trevathan
 
Offline First Applications
Offline First ApplicationsOffline First Applications
Offline First Applications
GeekNightHyderabad
 
Offline first: application data and synchronization
Offline first: application data and synchronizationOffline first: application data and synchronization
Offline first: application data and synchronization
EatDog
 
Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up	Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up
droidcon Dubai
 
Data Synchronization Patterns in Mobile Application Design
Data Synchronization Patterns in Mobile Application DesignData Synchronization Patterns in Mobile Application Design
Data Synchronization Patterns in Mobile Application Design
Eric Maxwell
 

Viewers also liked (8)

Offline Application Cache
Offline Application CacheOffline Application Cache
Offline Application Cache
 
Offline Strategy for an Online World
Offline Strategy for an Online WorldOffline Strategy for an Online World
Offline Strategy for an Online World
 
Offnet- Offline Mobile Application
Offnet- Offline Mobile ApplicationOffnet- Offline Mobile Application
Offnet- Offline Mobile Application
 
Designing For Offline
Designing For OfflineDesigning For Offline
Designing For Offline
 
Offline First Applications
Offline First ApplicationsOffline First Applications
Offline First Applications
 
Offline first: application data and synchronization
Offline first: application data and synchronizationOffline first: application data and synchronization
Offline first: application data and synchronization
 
Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up	Sync is hard: building offline-first Android apps from the ground up
Sync is hard: building offline-first Android apps from the ground up
 
Data Synchronization Patterns in Mobile Application Design
Data Synchronization Patterns in Mobile Application DesignData Synchronization Patterns in Mobile Application Design
Data Synchronization Patterns in Mobile Application Design
 

Similar to Implementing Data Caching and Data Synching Using Oracle MAF

Oracle E-Business Suitre mobile apps ADF
Oracle E-Business Suitre mobile apps ADFOracle E-Business Suitre mobile apps ADF
Oracle E-Business Suitre mobile apps ADF
Berry Clemens
 
Con9437 ad ffor_ebs and mobile
Con9437 ad ffor_ebs and mobileCon9437 ad ffor_ebs and mobile
Con9437 ad ffor_ebs and mobile
Berry Clemens
 
Adf mobile overview
Adf mobile overviewAdf mobile overview
Adf mobile overview
Oracle Corporation
 
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...Dr. Wilfred Lin (Ph.D.)
 
Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert Infotech
Narendra Jakhotia
 
Con8439 fusion apps customs to ebs
Con8439 fusion apps customs to ebsCon8439 fusion apps customs to ebs
Con8439 fusion apps customs to ebsBerry Clemens
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
Women in Technology Poland
 
Oracle Mobile Solution Overview
Oracle Mobile Solution OverviewOracle Mobile Solution Overview
Oracle Mobile Solution Overview
Mee Nam Lee
 
Maximize Availability With Oracle Database 12c
Maximize Availability With Oracle Database 12cMaximize Availability With Oracle Database 12c
Maximize Availability With Oracle Database 12c
Digicomp Academy Suisse Romande SA
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewFred Sim
 
01 oracle application integration overview
01 oracle application integration overview01 oracle application integration overview
01 oracle application integration overview
nksolanki
 
Oracle Mobile Cloud / Bot
Oracle Mobile Cloud / BotOracle Mobile Cloud / Bot
Oracle Mobile Cloud / Bot
Mee Nam Lee
 
Extending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalExtending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalRohit Dhamija
 
Programming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionappsProgramming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionapps
Berry Clemens
 
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua ArquiteturaFernando Galdino
 
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e AndroidCrie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Bruno Borges
 
SDN Service Provider Use Cases
SDN Service Provider Use CasesSDN Service Provider Use Cases
SDN Service Provider Use Cases
SDxCentral
 
Future of Oracle Forms AUSOUG 2013
Future of Oracle Forms AUSOUG 2013Future of Oracle Forms AUSOUG 2013
Future of Oracle Forms AUSOUG 2013
Chris Muir
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
Chris Whealy
 

Similar to Implementing Data Caching and Data Synching Using Oracle MAF (20)

Oracle E-Business Suitre mobile apps ADF
Oracle E-Business Suitre mobile apps ADFOracle E-Business Suitre mobile apps ADF
Oracle E-Business Suitre mobile apps ADF
 
Con9437 ad ffor_ebs and mobile
Con9437 ad ffor_ebs and mobileCon9437 ad ffor_ebs and mobile
Con9437 ad ffor_ebs and mobile
 
Adf mobile overview
Adf mobile overviewAdf mobile overview
Adf mobile overview
 
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...B1   roadmap to cloud platform with oracle web logic server-oracle coherence ...
B1 roadmap to cloud platform with oracle web logic server-oracle coherence ...
 
Ramji
RamjiRamji
Ramji
 
Next gen tech from QuickXpert Infotech
Next gen tech   from QuickXpert InfotechNext gen tech   from QuickXpert Infotech
Next gen tech from QuickXpert Infotech
 
Con8439 fusion apps customs to ebs
Con8439 fusion apps customs to ebsCon8439 fusion apps customs to ebs
Con8439 fusion apps customs to ebs
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Oracle Mobile Solution Overview
Oracle Mobile Solution OverviewOracle Mobile Solution Overview
Oracle Mobile Solution Overview
 
Maximize Availability With Oracle Database 12c
Maximize Availability With Oracle Database 12cMaximize Availability With Oracle Database 12c
Maximize Availability With Oracle Database 12c
 
Oracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c OverviewOracle - Enterprise Manager 12c Overview
Oracle - Enterprise Manager 12c Overview
 
01 oracle application integration overview
01 oracle application integration overview01 oracle application integration overview
01 oracle application integration overview
 
Oracle Mobile Cloud / Bot
Oracle Mobile Cloud / BotOracle Mobile Cloud / Bot
Oracle Mobile Cloud / Bot
 
Extending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-FinalExtending Enterprise Applications to mobile interfaces-Final
Extending Enterprise Applications to mobile interfaces-Final
 
Programming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionappsProgramming-best practices( beginner) ADF_fusionapps
Programming-best practices( beginner) ADF_fusionapps
 
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
[TDC 2013] Integre um grid de dados em memória na sua Arquitetura
 
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e AndroidCrie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
Crie Aplicações Mobile Híbridas Escritas em Java, para iOS e Android
 
SDN Service Provider Use Cases
SDN Service Provider Use CasesSDN Service Provider Use Cases
SDN Service Provider Use Cases
 
Future of Oracle Forms AUSOUG 2013
Future of Oracle Forms AUSOUG 2013Future of Oracle Forms AUSOUG 2013
Future of Oracle Forms AUSOUG 2013
 
Introduction to SAP Gateway and OData
Introduction to SAP Gateway and ODataIntroduction to SAP Gateway and OData
Introduction to SAP Gateway and OData
 

Recently uploaded

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
WSO2
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 

Recently uploaded (20)

Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 

Implementing Data Caching and Data Synching Using Oracle MAF

  • 1. Implementing Data Caching and Data Syncing using Oracle Mobile Application Framework (MAF) Steven Davelaar Oracle Mobile A-Team Oracle Corporation @stevendavelaar Copyright © 2013, Oracle and/or its affiliates. All 1 rights reserved.
  • 2. Agenda Quick Intro to Oracle MAF Designing a Mobile-Optimized API – On-demand loading versus data caching Using A-Team Mobile Persistence Accelerator – Implementing Data Caching – Implementing Data Syncing Copyright © 2013, Oracle and/or its affiliates. All 2 rights reserved.
  • 3. Oracle Mobile Application Framework Productivity boosting mobile development framework Build Once, Run on Multiple-Platforms Simpler UI development Java, JavaScript, and HTML5-based application development Choice of development tools Offline-capable: SQLite with Encryption Full Access to Native Device Features Modular, Reusable Components Copyright © 2013, Oracle and/or its affiliates. All 3 rights reserved.
  • 4. Business Logic Development Access and Process Application Data Code logic with Java Lightweight JVM Native library on device Copyright © 2013, Oracle and/or its affiliates. All 4 rights reserved.
  • 5. UI Implementation Options in Oracle MAF Component based page definition – AMX Components Programmatic HTML5 – with any third-party HTML5 frameworks Remote URL – Any server-side HTML Copyright © 2013, Oracle and/or its affiliates. All 5 rights reserved.
  • 6. Extend and Expand Add capabilities to the framework Cordova Plug-in Support – Add functionality such as barcode scanning, NFC, geo-fencing, etc. – Cross platform Custom AMX Component Support – Allows developer to add custom UI components to the framework Copyright © 2013, Oracle and/or its affiliates. All 6 rights reserved.
  • 7. Oracle MAF Architecture Device Native Container HTML5 JavaScript Presentation PhoneGap/ Cordova Device Services Copyright © 2013, Oracle and/or its affiliates. All 7 rights reserved. Web View Server HTML ADF Mobile AMX View Oracle IDM Oracle IAM Third Party Web Sites Server or Cloud backend Mobile Device Local HTML Configuration Server ADF Controller Credential Management, SSO Access Control App Config Server SOAP REST Web Services Java VM Business Logic ADF Model Encrypted SQLite DB JDBC SQLite
  • 8. Oracle MAF Architecture Device Native Container HTML5 JavaScript Presentation PhoneGap/ Cordova Device Services Copyright © 2013, Oracle and/or its affiliates. All 8 rights reserved. Web View Server HTML ADF Mobile AMX View Oracle IDM Oracle IAM Third Party Web Sites Server or Cloud backend Mobile Device Local HTML Configuration Server ADF Controller Credential Management, SSO Access Control App Config Server SOAP REST Web Services Java VM Business Logic ADF Model Encrypted SQLite DB JDBC SQLite
  • 9. Agenda Quick Intro to Oracle MAF Designing a Mobile-Optimized API – On-demand loading versus data caching Using A-Team Mobile Persistence Accelerator – Implementing Data Caching – Implementing Data Syncing Copyright © 2013, Oracle and/or its affiliates. All 9 rights reserved.
  • 10. What is a Mobile API? API = Application Programming Interface The API is typically hosted on a remote server (on-premise) or in the cloud The mobile app typically accesses the API over HTTP using SOAP or RESTful web services Copyright © 2013, Oracle and/or its affiliates. All 10 rights reserved. 1
  • 11. What is a Mobile-Optimized API? A mobile-optimized API uses RESTful services with JSON payload – Easy, flexible, performant, de facto standard – SOAP-XML creates larger payloads and is slower to process A mobile-optimized API is designed with mobile app in mind – Returns clean payloads that are fit for purpose – Supports required data caching and offline use case scenarios Existing back-end system API’s are typically NOT mobile-optimized Copyright © 2013, Oracle and/or its affiliates. All 11 rights reserved. 1
  • 12. Designing a Mobile-Optimized HR API Copyright © 2013, Oracle and/or its affiliates. All 12 rights reserved.
  • 13. Designing a Mobile-Optimized HR API Design optimized for on-demand data loading – Get list of departments with only id and name – Get details of one department with summary list of employees – Get details of one employee Design optimized for data caching / offline usage – Get list of departments and its employees with all attributes Mobile-optimized API needs to be flexible to support both scenarios! Copyright © 2013, Oracle and/or its affiliates. All 13 rights reserved.
  • 14. Designing a Mobile-Optimized API The mobile developer should drive API design – knows the supported form factors and which data is needed for which screen. – knows the requirements for offline mode, and how mobile development tool set supports and implements this. – designs data caching strategies for performance optimizations – decides which read and write actions can be performed in background thread not impacting user-perceived performance. Copyright © 2013, Oracle and/or its affiliates. All 14 rights reserved.
  • 15. Implementing a Mobile-Optimized API Use OSB to transform backend (SOAP) services to mobile API Use mock-up API to enable parallel development – Easy and fast with tools like MongoDB, Node.js, Express A-Team article series “Creating a Mobile-Optimized REST API Using Oracle Service Bus” – http://www.ateam-oracle.com/?cat=151 Copyright © 2013, Oracle and/or its affiliates. All 15 rights reserved.
  • 16. Agenda Quick Intro to Oracle MAF Designing a Mobile-Optimized API – On-demand loading versus data caching Using A-Team Mobile Persistence Accelerator – Implementing Data Caching – Implementing Data Syncing Copyright © 2013, Oracle and/or its affiliates. All 16 rights reserved.
  • 17. A-Team Mobile Persistence Accelerator (AMPA) Lightweight persistence framework that works on top of MAF Declarative consumption of REST-JSON services Significantly speeds up implementation of data caching and data synching Available as open source framework hosted on GitHub Provided “as-is”, no support, no updates from Oracle Ideas and features from this project will be included in the MAF product over time. Copyright © 2013, Oracle and/or its affiliates. All 17 rights reserved.
  • 18. AMPA – Project mobile-persistence on GitHub Copyright © 2013, Oracle and/or its affiliates. All 18 rights reserved.
  • 19. Runtime Persistence Architecture MAF Model Copyright © 2013, Oracle and/or its affiliates. All 21 rights reserved. DepartmentService Data Control EntityCRUDService extends SQLite DepartmentService uses Department Persistence Mapping XML DEPARTMENTS table references DBPersistence Manager JDBC Statements REST-JSON PersistenceManager HTTP Requests REST(JSON/XML)
  • 20. AMPA - JDeveloper Wizards Three wizard are provided to create the artefacts needed for this runtime persistence architecture: – Mobile Business Objects From Web Service Data Control Wizard – Mobile Business Objects From REST Web Service Wizard – Mobile Business Objects From Database Tables (Local persistence only) Another wizard is provided to generate a default CRUD user interface on top of the business layer created by one of the above wizards. Copyright © 2013, Oracle and/or its affiliates. All 22 rights reserved.
  • 21. Rest Wizard Demo - Toplink Data Services M/ToplinkRest/persistence/v1.0/Model1/query/Department.findAll Copyright © 2013, Oracle and/or its affiliates. All 23 rights reserved.
  • 22. Demo: Building Mobile Application – Model layer Including data caching, offline usage and data synchronization Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | Oracle 2
  • 23. Configured InitDBLifecycleListener Copyright © 2013, Oracle and/or its affiliates. All 63 rights reserved.
  • 24. Create Data Control For Service Classes Copyright © 2013, Oracle and/or its affiliates. All 64 rights reserved.
  • 25. Creating the Mobile User Interface Two Options Build Using Drag and Drop from DataControl Palette Generate Using MAF User Interface Generator Wizard Copyright © 2013, Oracle and/or its affiliates. All 65 rights reserved.
  • 26. Building the User Interface Copyright © 2013, Oracle and/or its affiliates. All 66 rights reserved.
  • 27. Building the User Interface Copyright © 2013, Oracle and/or its affiliates. All 67 rights reserved.
  • 28. Building the User Interface Copyright © 2013, Oracle and/or its affiliates. All 68 rights reserved.
  • 29. Demo: Building Mobile Application – UI layer Including data caching, offline usage and data synchronization Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 6
  • 30. Using the MAF User Interface Generator Copyright © 2013, Oracle and/or its affiliates. All 70 rights reserved.
  • 31. Using the MAF User Interface Generator Copyright © 2013, Oracle and/or its affiliates. All 71 rights reserved.
  • 32. Generated User Interface Artefacts Copyright © 2013, Oracle and/or its affiliates. All 72 rights reserved.
  • 33. AMPA - Offline Writes and Data Syncing If a remote persistence manager is configured, and CUD service call fails, the service call is registered as “pending” data synch action – Failure reason registered (device offline, service not available, etc) On next service call, the pending synch actions are processed first in order of creation – When failing again, the still pending synch action is updated with date of last synch attempt and last error message Out-of-the-box feature: NO Java coding required Copyright © 2013, Oracle and/or its affiliates. All 73 rights reserved.
  • 34. Viewing Pending Data Sync Actions A reusable “DataSync” feature is provided that can be added to your mobile application Register the feature in adfmf-application.xml Copyright © 2013, Oracle and/or its affiliates. All 74 rights reserved.
  • 35. Viewing Pending Data Sync Actions Add a button that navigates to the data sync feature Copyright © 2013, Oracle and/or its affiliates. All 75 rights reserved.
  • 36. Demo: Offline transactions and data syncing Copyright © 2014, Oracle and/or its affiliates. All rights reserved. | 7
  • 37. Viewing Pending Data Synch Actions Copyright © 2013, Oracle and/or its affiliates. All 77 rights reserved.
  • 38. Notes on Data Sync Functionality Pending changes can become obsolete because of updates in server data by other clients – The server–side code should identify this and throw an error when the data sync action sends stale data – Stale data detection can be done by including a data revision number or ‘last-modified” timestamp in payload. This number or timestamp should match with server-side data record Data sync actions that keep failing need to be removed manually – Local database might be out-of-sync, app needs to offer reconcile action Copyright © 2013, Oracle and/or its affiliates. All 78 rights reserved.
  • 39. Other Runtime Persistence Features Encryption of database Auto-cleaning of unused database segments Lazy loading of child collections (a.k.a “Indirection”) Entity caching to minimize object creation Supports server-derived primary keys FindEntityByKey – Checks cache first, then database Designed for customization – Easy to override and extend default behavior Copyright © 2013, Oracle and/or its affiliates. All 79 rights reserved.
  • 40. AMPA - More Info A-Team Chronicles: http://www.ateam-oracle.com/?p=29192 Includes download links to – Source code on GitHub – Videos – Demo applications Copyright © 2013, Oracle and/or its affiliates. All 80 rights reserved.
  • 41. Summary Start with designing and implementing a mobile-optimized REST API Use AMPA to declaratively consume the REST/JSON web services Use AMPA to implement data caching and syncing using the on-device SQLite database Think about how your end users should handle failed data sync actions, and how to prevent updates based on stale data Copyright © 2013, Oracle and/or its affiliates. All 81 rights reserved.
  • 42. Copyright © 2013, Oracle and/or its affiliates. All 82 rights reserved.