Introduction to Oracle MAF

advertisement
<BILD EINFÜGEN>
Mobile Application Framework (MAF)
Introduction
virtual7 – The Oracle Middleware Experts
Agenda
• Mobile is Eating the World
• Enterprise Mobility
• Mobile Application Types
• Oracle’s Mobile Strategy
• Mobile Application Framework (MAF)
virtual7 – The Oracle Middleware Experts
Mobile is Eating the World
BY THE END OF 2013 THERE WILL BE MORE
MOBILE DEVICES ON EARTH THAN PEOPLE
Source: APPVERTISING, 2013, STEPHEN MOLLOY (LOMAH Studios and The Inspiration
Room founder)
virtual7 – The Oracle Middleware Experts
Mobile is Eating the World
MOBILE DEVICES NOW OUTNUMBER HUMANS
(OCT 2014)
http://www.mediabistro.com/prnewser/mobile-devices-now-outnumber-humans_b100988
http://www.independent.co.uk/life-style/gadgets-and-tech/news/there-are-officially-more-mobile-devices-than-people-in-the-world-9780518.html
http://www.techtimes.com/articles/17431/20141008/mobile-devices-now-outnumber-humans-report.htm
virtual7 – The Oracle Middleware Experts
Mobile is Eating the World
Statistics show that sales of mobile device outperform PC sales …
virtual7 – The Oracle Middleware Experts
Mobile is Eating the World
… and that sales of smart-phones and tablets are growing constantly
virtual7 – The Oracle Middleware Experts
Mobile is Eating the World
The Consumer Market for Mobile
Quick uptake of new trends and technologies
– Mobile everywhere anytime
– Home is where my phone is
Mobile as the "external brain" and memory
– Information, Notes, Reminders, Addresses, Pictures
Omnipotent order-entry device for private business
– Shopping, theatre and restaurant reservations, travel booking etc.
Trend setter for enterprise applications
– Demanding as for what applications should do and look like
virtual7 – The Oracle Middleware Experts
Agenda
• Mobile is Eating the World
• Enterprise Mobility
• Mobile Application Types
• Oracle’s Mobile Strategy
• Mobile Application Framework (MAF)
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
TWO THIRDS OF THE WORKFORCE WILL OWN A
SMARTPHONE BY 2016, AND 40% OF THE
WORKFORCE WILL BE MOBILE
SOURCE: GARTNER 2013 (Technology Research)
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
GSMA Mobile World Congress 2014
•
•
•
•
•
More than 85,000 attendees
More than 46,000 C-Level leaders
More than 4,500 CEOs in attendance
More than 1,800 exhibitors
3,900+ press members representing
84 countries
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
Challenges – Administration and Maintenance
•
•
•
•
•
Rate of Change
Diversity of mobile devices to support
Deployment
Application-, Device-, and Data Security
How-to measure mobile application success
 Determine if budget is well spent
• Mobile users don't know of office hours and weekends
 The new meaning of "24x7 availability"
 Varying user load
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
Challenges – Development
• How-to reuse existing business services
• Mobile offline operation
 Synchronizing data between the mobile device and the server
 Ensuring data consistency
• User preferences and profile
 How to maintain a single user profile across devices and applications
• Definition of "application"
 Logical application vs. physical applications
 Architecture choices
• Real-time context awareness
 Location based queries
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
Challenges – Performance
• Load from large number of mobile devices may require
 New balancing/caching techniques
 Batch queries and updates
• Business data needs
 Tailoring
 Filtering
• Web applications usually remain active
 Mobile is not a replacement of the web
 Mobile is an access channel
 A single user may produce load on two system
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
Challenges – Usability
• Look & feel
• Navigation paths
 Hub & Spoke vs. Navigation Trees
 Flat navigation models
•
•
•
•
Virtual keyboard vs. physical keyboards
Visualization on small displays
Data entry = Submit = Commit ?
Integration of media: social, images, videos, audio
virtual7 – The Oracle Middleware Experts
Enterprise Mobility
Enterprise Mobility is an Imperative, not a
Choice.
virtual7 – The Oracle Middleware Experts
Agenda
• Mobile is Eating the World
• Enterprise Mobility
• Mobile Application Types
• Oracle’s Mobile Strategy
• Mobile Application Framework (MAF)
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Traditional Web Sites
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Mobile Browser – Pages as they are
Usable?
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Mobile Browser - Mobile Web
Characteristics
• aka. Adaptive & Responsive Design
• Adaptive: Sites designed for mobile only
• Responsive: Sites rearrange themselves to utilize
(limited) screen real estate
• Online access via mobile device browser
• Browser provides access to device features
(eg. camera, GPS, etc.)
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Mobile Browser - Mobile Web
Disadvantages
• Is not native
• May not feel or operate like a native application
• Duplicate code
• Cannot call native optimized APIs (directly)
• Cannot disconnect or go offline
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Native Applications
Characteristics
• Application installed & runs on device
• Uses native code and APIs
• Optimized for mobile platform and form factor
• Direct access to local storage and device services
• Offline support
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Native Applications
Disadvantages
• Solution only deploys to one platform, it cannot be
run across iOS & Android
• Code reuse can be complex
• Portability requires work
• You’ll need both iOS (Objective-C) & Android
developers (Java)
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Hybrid Applications
Characteristics
• Application installed on device
• HTML5, CSS3, JS
• Runs within a native web container
• Inherently cross platform
• Utilize existing skillsets
• Direct access to local storage and device services
• Code reuse and portability simplified
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Hybrid Applications – Business Reasoning
41% CIOS CITED MOBILITY IS EXPENSIVE AND A
CRITICAL CHALLENGE!
•
•
•
•
•
•
“It takes us months, no, years to release updates”
“Our IT budgets are shrinking, not growing”
“We can’t hire new iOS & Android developers”
“We need cross platform support to reduce costs”
“We want offline support with maximum security”
“We don’t want to change our existing architectures”
SOURCE: MCKINSEY, 2012: MOBILITY DISRUPTION: A CIO PERSPECTIVE
virtual7 – The Oracle Middleware Experts
Mobile Application Types
Hybrid Applications – The way to go for Enterprise
ENTEPRISE MOBILE APP DEVELOPMENT
WILL BE 10% NATIVE, 60% HYBRID, 30%
MOBILE WEB"
SOURCE: GARTNER, 2013
virtual7 – The Oracle Middleware Experts
Agenda
• Mobile is Eating the World
• Enterprise Mobility
• Mobile Application Types
• Oracle’s Mobile Strategy
• Mobile Application Framework (MAF)
virtual7 – The Oracle Middleware Experts
Oracle’s Mobile Strategy
virtual7 – The Oracle Middleware Experts
Oracle’s Mobile Strategy
virtual7 – The Oracle Middleware Experts
Oracle’s Mobile Strategy
virtual7 – The Oracle Middleware Experts
Oracle’s Mobile Strategy
virtual7 – The Oracle Middleware Experts
Agenda
• Mobile is Eating the World
• Enterprise Mobility
• Mobile Application Types
• Oracle’s Mobile Strategy
• Mobile Application Framework (MAF)
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Mobile Application Framework (MAF) Overview
• Formerly named ADF Mobile
• Build Once, Run on Multiple-Platforms
 Phones, Tablets, iOS, Android, …
 HTML5/JavaScript user interface
 Java for business logic!
•
•
•
•
Disconnected: SQLite with encryption
Full access to native device features
Modular, reusable application components
JDeveloper and Eclipse
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Mobile Application Framework (MAF) Overview
• Device Native Mobile User Experience
• Spring board and tab bar for feature navigation
• Advanced HTML5-based UI - Full animation,
gesture, and touch interaction support
• Interactive Data Visualization Components
• Device Interaction using Cordova
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
MAF Architecture
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Development Environment
• IDE
 JDeveloper with the MAF extension
 Eclipse with the Oracle Enterprise Pack for Eclipse (OEPE) with Oracle Mobile
Application Framework (MAF)
• Mobile development SDKs
 Used to compile device native binaries
• Devices or simulators to test
 Direct deploy
 Mobile developer program membership needed to deploy to an actual device
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
MAF Application Structure
“The content of a MAF application is comprised of one or more embedded
applications known as application features, which are represented as icons within
the application's springboard or navigation bar”
Springboard
• Is the landing screen where all of the apps/features are displayed (desktop
of the phone/application)
Features
• are essentially the building blocks of a mobile application
• perform a specific set of tasks like managing customer contacts or listing
the product inventory
• are independent of one another, each application feature has its own class
loader and web view
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Creating a MAF Application
• Choose File, then New, and then Application, and choose the
Mobile Application Framework Application template
• This generates an application with 2 projects
 ApplicationController Project – houses application implementation
files like definitions of skins or application lifecycle listener (ALCL)
 ViewController Project - houses resources and implementation
for the application features
 Application Resources – application level configuration files for
defining application name, content, springboard, database
connections, web-service policies, JVM startup settings, etc.
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Creating Features
ViewController -> adfmf-feature.xml – the configuration file for declaring features
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Referencing Features
Application Resources -> maf-application.xml – is the application configuration file
• Feature References – used for adding features used in the application
 Select one of the defined feature
 Configure if it will be shown in the default navigation bar
 Configure if it will be shown in the default springboard
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Configuring the Springboard
Application Resources -> maf-application.xml – is the application configuration file
• Application – application configuration




Application Name
Lifecycle Event Listener Class
Navigation Bar configuration
Springboard configuration (none, default,
custom)
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
UI - Web View
Web View - Uses a mobile device's web engine to display and process web-based
content. In a MAF application, the web view delivers the user interface by rendering
the application mark-up as HTML 5.
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
UI - Web View – Feature Content Types
• MAF AMX
 JSF-like file / page flow, built visually in JDeveloper
 Generated into HTML/JS on device at RT
 Based on HTML5
• Local HTML
 Hand-coded HTML5 pages
• Remote URL
 Hand-coded HTML5 pages
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Building AMX Pages
• JSF-Like implementation using components
• JDeveloper:
 Components wizard - Drag and drop functionality
 Property Inspector
 Preview panel
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Accessing Device Features
Cordova - The Apache Cordova JavaScript APIs integrate the device's native
features and services into a mobile application. You can access these APIs
programmatically from Java/Javascript code or you can add device integration
declaratively when you create MAF AMX pages because MAF packages these APIs
as data controls.
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Accessing Device Features
• Evaluating device properties / information – using the Expression Builder wizard
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Accessing Device Features
• Using Device Features Data Control – drag and drop
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Accessing Device Features – Configuring Access
Application Resources -> maf-application.xml – is the application configuration file
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Business Logic and Data
Business Logic and Data – MAF comes with a set of features suited for
implementing business logic, data definition and data access, by the means of a
JVM, APIs for DB and Web Service access and an own Encrypted SQLite DB
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Business Logic and Data
• Java Virtual Machine - Java provides a Java runtime environment for a MAF application. This
JVM is implemented in device-native code, and is embedded (or compiled) into each instance
of the MAF application as part of the native application binary.
 Business Logic - Java enables the business logic in MAF applications trough Managed
Beans (similar to JSF Managed Beans)
 Model - Contains the binding layer that connects the business logic components with the
user interface. In addition, the binding layer provides the execution logic to invoke REST
or SOAP-based web services.
 JDBC - The JDBC API enables the model layer to access the data in the encrypted
SQLite database through CRUD (Create, Read, Update and Delete) operations.
• Encrypted SQLite Database - the MAF application generates this lightweight, cross-platform
relational database. Because this database is encrypted, it secures data if the device is lost or
stolen. Only users who enter the correct user name and password can access the data in the
local database
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Push Notifications
Push Handler - Enables the MAF application to receive events from the iOS or
Android notification servers. The Java layer handles the notification processing.
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Push Notifications – How do they work?
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Push Notifications – Implementation
1. Registering the ApplicationLifeCycleListener …
 Where? Remember? … Application Resources -> maf-application.xml – is the application
configuration file
2. … so that on start of the application to register a new PushNotificationListener
 How? – Implement Java code in the start() method of the LifeCycleListener
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Push Notifications – Implementation
3. … with the PushNotificationListener being a concrete EventListener
4. … which onOpen() receives the token and stores it as the deviceToken
 How? – Implement Java code in the onOpen() method of the PushNotificationListener
virtual7 – The Oracle Middleware Experts
Mobile Application Framework (MAF)
Push Notifications – Implementation
5. … and onMessage() does the propper job
 How? – Implement Java code in the onMessage() method of the PushNotificationListener
virtual7 – The Oracle Middleware Experts
Question and Answers
virtual7 – The Oracle Middleware Experts
Download