Best Practices Implementing Oracle Mobile Cloud Service Rubén Rodríguez Cloud & Mobile Solution Specialist 07/06/2018
Introduction About me ADF Technical Lead, Cloud & Mobile Solution Specialist Blogger (www.rsantrod.com & blog.avanttic.com) Developer Community Forums Author www.linkedin.com/in/rsantrod ruben.rodriguez@avanttic.com @rsantrod 2
Introduction Build RESTful APIs using Oracle ADF BC as REST and Node.js and deploy on Java Cloud Service and Application Container Cloud Service The architecture and functionality of the Oracle Mobile Cloud Enterprise Integrate different systems and building Mobile ready APIs using Mobile Core Build hybrid applications using Oracle JavaScript Extension Toolkit Create mobile-first Uis using Oracle VBCS, the low-code platform Build a Chatbot for your enterprise using Oracle Intelligent Bots Cloud Service 4
Introduction About avanttic + 170 35 Solutions Specialized Business Analytics Fusion Middleware Infraestructura y Plataforma Cloud (IaaS & PaaS) Offices in Madrid y Barcelona 5
Agenda 1. Oracle MCS Overview 2. Tips & Tricks 3. Demo 4. Customer case 6
Oracle MCS overview 7
Oracle MCS overview Challenges of Enterprise Mobile Development Cross platform support Existing enterprise services aren t built for mobile. Push notifications Offline data synchronization Analytics Security 8
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
Oracle MCS overview Arquitecture Solution Oracle MAF & MAX Diagnostics Analytics Lifecycle Developer Oracle Cloud Mobile Backend Custom APIs Connectors REST REST APIs Node SOAP Cloud/Internet ICS Mobile Client SDKs Platform APIs On-Premise JavaScript SDK Push Notifications User Services File Storage Relational Database Data Offline App Policies Oracle Mobile Cloud Service Location Services 9
16
API design /getemployeebyname /createnewemployee /deleteallemployees Resource POST create GET read PUT update DELETE delete /employees Create a new employee List employees Bulk update of employees Delete all employees /employees/100 Show employee 100 Update employee 100 Delete employee 100 Filtering GET GET /employees?name=john /employees?salary<=25000 Sorting GET /employees?sort=+salary,-name 17
API design Code Name Meaning 200 OK Everything went fine. I return the resource you requested. 201 Created We successfully created a new resource. 204 No Content There is nothing to see here. 401 Unauthorized You did not provide valid credentials. 404 Not found Return this if a requested object could not be found. 422 Unprocessable Entity Resource cannot be saved. 18
API design 19
Express API 20
Express API 21
Express API 22
API-First approach Connectors Custom APIs Departments REST Departments DepartmentsAPI /departments /departments/1 Employees /departments /1/employees /departments /1/employees/10 Employees SOAP Tasks EmployeesAPI /employees /employees/1 Tasks SOAP /employees/1/tasks /employees /1/tasks/10 23
API-First approach Connectors Custom APIs Departments REST Departments DepartmentsBase DELETE GET DepartmentsAPI /departments /departments/1 Employees POST /departments /1/employees PUT /departments /1/employees/10 Employees SOAP Tasks EmployeesBase EmployeesAPI DELETE /employees /employees/1 GET POST /employees /1/tasks Tasks SOAP PUT /Employees /1/tasks/10 24
Using node.js modules 25 http://bit.ly/mcspdfkit
Using node.js modules 26 http://bit.ly/mcstwitterfeed
Callback Hell 27
Callback Hell 28
Callback Hell 29
Callback Hell 30
JSON Translator 31
JSON Translator 32
JSON Translator 33
JSON Translator 34
JSON Translator: Using xml2js module ' $ ' means that we want to add attributes to the XML element. ' _ ' means that we want to have something inside that element. http://bit.ly/mcsbypasstranslator 35
Application Policies 36
Application Policies 37
Application Policies 38
Application Policies 39 http://bit.ly/mcsapppolicies
Application Policies 40 http://bit.ly/mcsapppolicies
Application Policies 41 http://bit.ly/mcsapppolicies
Application Policies 42 http://bit.ly/mcsapppolicies
API-design first 1 Avoid rework: feedback early in the cycle By getting feedback very early in the lifecycle, changes of rework late in the cycle are slim. Saving time and cost. 2 Parallel development: Decouple App dev from Service dev By defining APIs with API Blueprints or Swagger, app dev and service dev can occur in parallel. 3 Agile: be ready for change By continuously verifying service builds against API definitions, non-compliant updates can be detected quickly. Thanks to Luis Weir for sharing this slide
API-design first 45
Custom Code Test Tools MCS-TOOLS Oracle MCS MCS-CCC MCS-TEST Oracle Mobile API Platform APIs MCS-DEPLOY Custom API Implementation 46
Custom Code Test Tools 47
Custom Code Test Tools 48
Custom Code Test Tools omce-ccc <path to toolsconfig.json> [--debug] [--verbose] omce-test <path to toolsconfig.json> <test name> [- verbose] omce-deploy <toolsconfig.json> -u <MCS team member> -p <pass> [--verbose] 49
Demo 50
Customer cases Industrial Farmacéutica Cantabria (IFC) 51
Customer case: IFC Customer problems 52
Customer case: IFC Customer problems Internet connection is required to work. Delivery performance. General application vs Specific application. CRM application is not mobile friendly. Catalog. 53
Customer case: IFC Challenges Provide an agile tool to the sales force so they can work with their corporate CRM (Oracle Siebel). Implement a scalable, secure, and flexible platform. Incorporate Oracle MCS at half-way of the project Develop specific application for ios/android devices. 100% offline application. Short development time needed. 54
Customer case: IFC Solution 55
Questions www.linkedin.com/in/rsantrod ruben.rodriguez@avanttic.com @rsantrod 56
Rubén Rodríguez ruben.rodriguez@avanttic.com 57