1
End-to-End Cloud: JCS, MCS,
MAF and JET
Andrejus Baranovskis, Oracle ACE Director, Red Samurai Consulting
2About Us
Oracle Experts Team
• Oracle Fusion Middleware Partner Community Award for Outstanding ACM/BPM Contribution 2015
• Oracle Fusion Middleware Innovation Award Winner 2010
• SOA Partner Community Award for Outstanding Contribution Across the World 2010
• 2010 Enterprise 2.0 Blazer: Enterprise 2.0 Leader Award
ADF, JET, MAF, Cloud, BPM, ACM, SOA, WebCenter, WebLogic
3
Demo Demo Demo
Application Container Cloud QuestionsUse Case Overview
Mobile Application
Framework
ADF BC REST and
Java Cloud Service
Agenda
Mobile Cloud Service
JavaScript Extension Toolkit
4
USE CASE OVERVIEW
Oracle Cloud Services for Warehouse.
5ChB Jelly House
Startup Candy Company
Supply manager is responsible to
request warehouse stock update.
Gets notification when stock goes
below minimum threshold
Stock Supply
Production manager is responsible to
log warehouse stock usage.
Production
Producing and selling natural jelly candies. Production
process requires warehouse stock shortage tracking.
Based in Lithuania, EU.
About
6Application Flow
Warehouse Process
Use Stock 01
Threshold 02
Notification 03
Order Stock 04
Production takes stock.
JET application calls
MCS REST service to
log stock usage.
JET/MAF & MCS/ACC
Stock is below
threshold. MCS checks
condition and sends
notification.
MCS
MCS sends notification.
Manager receives
notification, data is
synchronized.
JET/MAF & MCS
Order stock by calling
MCS REST service.
Third party invoice data
is updated through ADF
BC REST on JCS
JET/MAF & MCS/JCS/ACC
7Technology Used
Oracle Cloud and Development Tools
01
JCS
02
MCS
03
ACC
Handling REST services for
mobile interface. API Node.js
implementation. MCS DB.
Mobile
Running JET Web app, OAuth
security, reuse of MCS REST
services.
Web app
Integrating with third party HR
DB and invoice data.
ADF BC REST
Accessing MCS REST services
through mobile. Deployed to
device. Same code as JET.
Mobile access
05
JET Hybrid
Alternative mobile access,
depends on company skillset.
Mobile access
06
MAF
Accessing MCS REST services
through Web.
Web access
04
JET
8Cloud Services Interaction Flow
Use Case Explanation
DbaaS JCS
A
D
F
B
C
R
E
S
T
R
E
S
T
C
O
N
N
E
C
T
O
R
MCS
R
E
S
T
E
N
D
P
O
I
N
TSECURITY
Token Security
API Node.js
DB Connector Notifications
Storage Location
Google/A
pple
OAuth
OAuth
JET
JET Hybrid
or MAF
9JET Interface
Running on ACC (Application Container Cloud)
User responsible for candy production logs stock usage. JET application.
CANDY PRODUCTION
10JET Hybrid Interface
Application running on mobile device
Secured by OAuth and MCS
Backend. Can be secured by
custom secure token.
Security
Consumes MCS REST services
and subscribes to notifications
raised by MCS custom API.
REST Services and Notifications
JET Hybrid is JET application
wrapped into Cordova and
deployed to mobile device.
Cordova
User responsible for candy stock supply
updates stock numbers.
CANDY STOCK SUPPLY
11
USE CASE DEMO
Oracle Cloud Services for Warehouse.
12
ADF BC REST & JCS
Backend Data Management and Java Cloud Service.
13DbaaS Configuration
Database Cloud
Accessible by public IP. Provides DB admin tools.
DB CLOUD MACHINE ACCESS
Provides automatic backup. DB backup option is
required for WebLogic 12.2.1 Cloud instance
configuration.
BACKUP
14DbaaS Backup
Cloud Storage Container – REST API
curl -i -X GET -H "X-Storage-User: Storage-redsamurai:abaranovskis@redsamuraiconsulting.com" -H "X-Storage-Pass: *Password*"
https://redsamurai.storage.oraclecloud.com/auth/v1.0
HTTP/1.1 200 OK
date: 1472150723577
X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1
X-Storage-Token: AUTH_tkf83371940961d6a9b1776819e71440d1
X-Storage-Url: https://em2.storage.oraclecloud.com/v1/Storage-redsamurai
1. AUTHENTICATION TOKEN
curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSDBContainer
curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371360961d6a9b17f9819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSJCSContainer
2. CREATE STORAGE CONTAINER
15JCS Configuration
Java Cloud
Can be created in Enterprise Manager Fusion
Middleware Control 12c
JDBC DATA SOURCE
Accessible by public IP
PUBLIC IP
Use cloud storage container to configure WLS backup.
BACKUP
16ADF BC REST
Development
17ADF BC REST
ADF Security – token authentication & authorization
18ADF BC REST
Deployment on JCS
Frank Nimphius, Oracle PM – “Keep in mind that businesses don't start from
scratch when a new technology or a new trend arrives. ADF BC REST is (in my
opinion) the easiest and most effective option for creating powerful and flexible REST
services based on SQL queries” http://bit.ly/2cf5lAP
ADF 12.2.1 BC REST
19
MOBILE CLOUD SERVICE
Mobile Data.
20Mobile Cloud Service
Overview
21Connectors
ADF BC REST Configuration
22Connectors
Rules and Security Tokens
23Connectors
Node.js and custom API
24Connectors
Simplifies REST Calls for Mobile Clients
25Custom API
Mobile Logic
26Custom API
REST Endpoints
27Custom API
REST Endpoints
28Custom API
Security
29Custom API
Security
30Custom API
Implementation with Node.js
31Custom API
Implementation with Node.js
32Custom API
MCS DB API
INSERT GET MERGE
33Custom API
MCS Connector API
34Custom API
MCS Notification API
35Mobile Backend
Diagnostics
36Mobile Backend
Log from Custom API – Useful for Debugging
37Mobile Backend
Cross-origin Resource Sharing (CORS) Configuration
38
JET
JavaScript Extension Toolkit.
39JET
Focus Areas
02
01
03
04
MCS OAuth
Instructions to use MCS OAuth in JET.
MCS REST
Instructions to consume MCS REST
services in JET.
MCS Notifications
Instructions to register and receive MCS
notifications in JET.
JET and JET Hybrid
Implementation principles. JavaScript and
HTML is reused in JET and JET Hybrid.
40Create JET Hybrid Application
Mobile Application As Easy As 1, 2, 3
npm -g install cordova This should be done first time only. npm is the default package manager for the JavaScript runtime environment Node.js
INSTALL CORDOVA
yo oraclejet:hybrid redsamuraiwarehouse --appId=com.warehouse --appName="redsamuraiwarehouse" --template=navbar --platforms=android
Yeoman runs as a command-line interface written for Node.js and which combines generating a starter template, managing dependencies
CREATE JET HYBRID APPLICATION
grunt build --platform=android Grunt is a JavaScript task runner
BUILD
grunt serve --platform=android --browser --disableLiveReload=true
RUN IN BROWSER
grunt serve --platform=android --destination=device
RUN ON DEVICE AS APPLICATION
41JET Hybrid Application
Application Structure
42JET Implementation
Index Page – Dynamic Blocks
43JET Implementation
Application Controller – Defines Router and Modules
44JET Implementation
Chart – HTML and JS
45JET Implementation
Gauge – HTML and JS
46JET Security
Mobile Cloud Service OAuth Integration – Download MCS SDK
47JET Security
Mobile Cloud Service OAuth Integration – Backend Wrapper and Keys
48JET Security
Mobile Cloud Service OAuth Integration – Login
49JET Security
Mobile Cloud Service OAuth Integration – Login
50JET Security
Mobile Cloud Service OAuth Integration – Network Monitor
51JET REST Call
Secure Mobile Cloud Service REST GET Invocation
52JET REST Call
Secure Mobile Cloud Service REST PATCH Invocation
53JET REST Call
Secure Mobile Cloud Service REST Invocation – Network Monitor
54JET and Notifications
Mobile Cloud Service Notifications – Register Push Clients
55JET and Notifications
Mobile Cloud Service Notifications – MCS UI
56JET and Notifications
Register Device for MCS Push
ADD CORDOVA PUSH PLUGIN
cordova plugin add phonegap-plugin-push --variable SENDER_ID="455522940425"
57
Application Container Cloud
JET in the Cloud.
58Application Container Cloud
Create and Package JET Application
Run express YourAppName, Node.js must be installed
GENERATE EMPTY NODE.JS APPLICATION
Navigate to YourAppName folder and run npm install to add
dependencies
ADD DEPENDENCIES
Copy JET implementation code into YourAppName public folder
JET IMPLEMENTATION
Add manifest.json file and create zip archive
JET PACKAGING
59Application Container Cloud
Deploy JET Application
60Application Container Cloud
Deploy JET Application
61
MAF
Mobile Application Framework.
62MAF and MCS Integration
MAF MCS Utility Application
Execute REST calls from MAF and pass security headers
SIMILAR INTEGRATION PRINCIPLES AS FOR JET HYBRID
More complex application testing and debugging process comparing to JET Hybrid
REQUIRES MOBILE SIMULATOR TO TEST CODE
Example is available for download from OTN
MAF MCS UTILITY IS AVAILABLE WITH MCS INTEGRATION EXAMPLE
When there are no JavaScript developers in the team
WHEN TO USE MAF
63
QUESTIONS
Learn More.
64
Sample code for JET Hybrid
and OAuth authentication
against MCS.
OAuth
Example of JET on
Application Container
Cloud.
ACC
Sample code for JET calling
MCS REST service.
MCS REST
Sample code for MCS
Connector calling ADF BC
REST service.
MCS Connector
Sample code for JET Hybrid
to register for MCS
notification.
Notifications
65
THANKS FOR WATCHING
See You Next Time
@RedSamurai @RedSamurai @RedSamurai

End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

  • 1.
    1 End-to-End Cloud: JCS,MCS, MAF and JET Andrejus Baranovskis, Oracle ACE Director, Red Samurai Consulting
  • 2.
    2About Us Oracle ExpertsTeam • Oracle Fusion Middleware Partner Community Award for Outstanding ACM/BPM Contribution 2015 • Oracle Fusion Middleware Innovation Award Winner 2010 • SOA Partner Community Award for Outstanding Contribution Across the World 2010 • 2010 Enterprise 2.0 Blazer: Enterprise 2.0 Leader Award ADF, JET, MAF, Cloud, BPM, ACM, SOA, WebCenter, WebLogic
  • 3.
    3 Demo Demo Demo ApplicationContainer Cloud QuestionsUse Case Overview Mobile Application Framework ADF BC REST and Java Cloud Service Agenda Mobile Cloud Service JavaScript Extension Toolkit
  • 4.
    4 USE CASE OVERVIEW OracleCloud Services for Warehouse.
  • 5.
    5ChB Jelly House StartupCandy Company Supply manager is responsible to request warehouse stock update. Gets notification when stock goes below minimum threshold Stock Supply Production manager is responsible to log warehouse stock usage. Production Producing and selling natural jelly candies. Production process requires warehouse stock shortage tracking. Based in Lithuania, EU. About
  • 6.
    6Application Flow Warehouse Process UseStock 01 Threshold 02 Notification 03 Order Stock 04 Production takes stock. JET application calls MCS REST service to log stock usage. JET/MAF & MCS/ACC Stock is below threshold. MCS checks condition and sends notification. MCS MCS sends notification. Manager receives notification, data is synchronized. JET/MAF & MCS Order stock by calling MCS REST service. Third party invoice data is updated through ADF BC REST on JCS JET/MAF & MCS/JCS/ACC
  • 7.
    7Technology Used Oracle Cloudand Development Tools 01 JCS 02 MCS 03 ACC Handling REST services for mobile interface. API Node.js implementation. MCS DB. Mobile Running JET Web app, OAuth security, reuse of MCS REST services. Web app Integrating with third party HR DB and invoice data. ADF BC REST Accessing MCS REST services through mobile. Deployed to device. Same code as JET. Mobile access 05 JET Hybrid Alternative mobile access, depends on company skillset. Mobile access 06 MAF Accessing MCS REST services through Web. Web access 04 JET
  • 8.
    8Cloud Services InteractionFlow Use Case Explanation DbaaS JCS A D F B C R E S T R E S T C O N N E C T O R MCS R E S T E N D P O I N TSECURITY Token Security API Node.js DB Connector Notifications Storage Location Google/A pple OAuth OAuth JET JET Hybrid or MAF
  • 9.
    9JET Interface Running onACC (Application Container Cloud) User responsible for candy production logs stock usage. JET application. CANDY PRODUCTION
  • 10.
    10JET Hybrid Interface Applicationrunning on mobile device Secured by OAuth and MCS Backend. Can be secured by custom secure token. Security Consumes MCS REST services and subscribes to notifications raised by MCS custom API. REST Services and Notifications JET Hybrid is JET application wrapped into Cordova and deployed to mobile device. Cordova User responsible for candy stock supply updates stock numbers. CANDY STOCK SUPPLY
  • 11.
    11 USE CASE DEMO OracleCloud Services for Warehouse.
  • 12.
    12 ADF BC REST& JCS Backend Data Management and Java Cloud Service.
  • 13.
    13DbaaS Configuration Database Cloud Accessibleby public IP. Provides DB admin tools. DB CLOUD MACHINE ACCESS Provides automatic backup. DB backup option is required for WebLogic 12.2.1 Cloud instance configuration. BACKUP
  • 14.
    14DbaaS Backup Cloud StorageContainer – REST API curl -i -X GET -H "X-Storage-User: Storage-redsamurai:abaranovskis@redsamuraiconsulting.com" -H "X-Storage-Pass: *Password*" https://redsamurai.storage.oraclecloud.com/auth/v1.0 HTTP/1.1 200 OK date: 1472150723577 X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1 X-Storage-Token: AUTH_tkf83371940961d6a9b1776819e71440d1 X-Storage-Url: https://em2.storage.oraclecloud.com/v1/Storage-redsamurai 1. AUTHENTICATION TOKEN curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSDBContainer curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371360961d6a9b17f9819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSJCSContainer 2. CREATE STORAGE CONTAINER
  • 15.
    15JCS Configuration Java Cloud Canbe created in Enterprise Manager Fusion Middleware Control 12c JDBC DATA SOURCE Accessible by public IP PUBLIC IP Use cloud storage container to configure WLS backup. BACKUP
  • 16.
  • 17.
    17ADF BC REST ADFSecurity – token authentication & authorization
  • 18.
    18ADF BC REST Deploymenton JCS Frank Nimphius, Oracle PM – “Keep in mind that businesses don't start from scratch when a new technology or a new trend arrives. ADF BC REST is (in my opinion) the easiest and most effective option for creating powerful and flexible REST services based on SQL queries” http://bit.ly/2cf5lAP ADF 12.2.1 BC REST
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
    32Custom API MCS DBAPI INSERT GET MERGE
  • 33.
  • 34.
  • 35.
  • 36.
    36Mobile Backend Log fromCustom API – Useful for Debugging
  • 37.
    37Mobile Backend Cross-origin ResourceSharing (CORS) Configuration
  • 38.
  • 39.
    39JET Focus Areas 02 01 03 04 MCS OAuth Instructionsto use MCS OAuth in JET. MCS REST Instructions to consume MCS REST services in JET. MCS Notifications Instructions to register and receive MCS notifications in JET. JET and JET Hybrid Implementation principles. JavaScript and HTML is reused in JET and JET Hybrid.
  • 40.
    40Create JET HybridApplication Mobile Application As Easy As 1, 2, 3 npm -g install cordova This should be done first time only. npm is the default package manager for the JavaScript runtime environment Node.js INSTALL CORDOVA yo oraclejet:hybrid redsamuraiwarehouse --appId=com.warehouse --appName="redsamuraiwarehouse" --template=navbar --platforms=android Yeoman runs as a command-line interface written for Node.js and which combines generating a starter template, managing dependencies CREATE JET HYBRID APPLICATION grunt build --platform=android Grunt is a JavaScript task runner BUILD grunt serve --platform=android --browser --disableLiveReload=true RUN IN BROWSER grunt serve --platform=android --destination=device RUN ON DEVICE AS APPLICATION
  • 41.
  • 42.
  • 43.
    43JET Implementation Application Controller– Defines Router and Modules
  • 44.
  • 45.
  • 46.
    46JET Security Mobile CloudService OAuth Integration – Download MCS SDK
  • 47.
    47JET Security Mobile CloudService OAuth Integration – Backend Wrapper and Keys
  • 48.
    48JET Security Mobile CloudService OAuth Integration – Login
  • 49.
    49JET Security Mobile CloudService OAuth Integration – Login
  • 50.
    50JET Security Mobile CloudService OAuth Integration – Network Monitor
  • 51.
    51JET REST Call SecureMobile Cloud Service REST GET Invocation
  • 52.
    52JET REST Call SecureMobile Cloud Service REST PATCH Invocation
  • 53.
    53JET REST Call SecureMobile Cloud Service REST Invocation – Network Monitor
  • 54.
    54JET and Notifications MobileCloud Service Notifications – Register Push Clients
  • 55.
    55JET and Notifications MobileCloud Service Notifications – MCS UI
  • 56.
    56JET and Notifications RegisterDevice for MCS Push ADD CORDOVA PUSH PLUGIN cordova plugin add phonegap-plugin-push --variable SENDER_ID="455522940425"
  • 57.
  • 58.
    58Application Container Cloud Createand Package JET Application Run express YourAppName, Node.js must be installed GENERATE EMPTY NODE.JS APPLICATION Navigate to YourAppName folder and run npm install to add dependencies ADD DEPENDENCIES Copy JET implementation code into YourAppName public folder JET IMPLEMENTATION Add manifest.json file and create zip archive JET PACKAGING
  • 59.
  • 60.
  • 61.
  • 62.
    62MAF and MCSIntegration MAF MCS Utility Application Execute REST calls from MAF and pass security headers SIMILAR INTEGRATION PRINCIPLES AS FOR JET HYBRID More complex application testing and debugging process comparing to JET Hybrid REQUIRES MOBILE SIMULATOR TO TEST CODE Example is available for download from OTN MAF MCS UTILITY IS AVAILABLE WITH MCS INTEGRATION EXAMPLE When there are no JavaScript developers in the team WHEN TO USE MAF
  • 63.
  • 64.
    64 Sample code forJET Hybrid and OAuth authentication against MCS. OAuth Example of JET on Application Container Cloud. ACC Sample code for JET calling MCS REST service. MCS REST Sample code for MCS Connector calling ADF BC REST service. MCS Connector Sample code for JET Hybrid to register for MCS notification. Notifications
  • 65.
    65 THANKS FOR WATCHING SeeYou Next Time @RedSamurai @RedSamurai @RedSamurai