rest drupal and android through...drupal 8 developer at md systems cto at hubbing.net @yongt9412....

30
drupalmountaincamp.ch DRUPAL AND ANDROID THROUGH REST QUICK INTEGRATION

Upload: others

Post on 28-Jun-2020

25 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

drupalmountaincamp.ch

DRUPAL AND ANDROID THROUGH REST

QUICK INTEGRATION

Page 2: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

John Gustavo Choque Condori Drupal 8 Developer at MD Systems

CTO at Hubbing.net@yongt9412

Page 3: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Introduction

OverviewWhat we gonna talk about?

1

Existing approaches2

Drupal side3

Android side4

Small details5

Demo6

Page 4: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Where does this come from?

Introduction

Page 5: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

How did I come up with this talk?Some short background

Page 6: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

What tools to use?And why?

Page 7: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Our target usersFinal decision

Page 8: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Drupalfithttps://github.com/yongjhih/drupalfit

DRUPAL 8

TESTS

UPDATESFLEXIBLEAPI

Page 9: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Simple Drupal 8 Loginhttps://github.com/itech-planet/Simple-Drupal-8-Login-for-Android

DRUPAL 8

TESTS

UPDATESFLEXIBLEAPI

Page 10: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

So many attemptsEither failed or outdated

https://github.com/ajinkyakulkarni/DrupalAndroidApp

https://github.com/voidberg-archive/DrupalDroid

Page 11: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

What was next?

Page 12: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Configuration

Drupalside

Page 13: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

REST moduleshttps://www.drupal.org/docs/8/core/modules/rest/overview

Page 14: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

HTTP Basic authenticationhttps://www.drupal.org/docs/8/core/modules/basic_auth/overview

Page 15: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

REST UIhttps://www.drupal.org/project/restui

Page 16: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

REST UIadmin/config/services/rest

Page 17: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Configuration

Androidside

Page 18: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

To think aboutHow do we, Drupal people, need to think of this?

POJO

Page 19: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

RetrofitA type-safe HTTP client for Android and Java

LATEST VERSION

MINIMUM ANDROID

GITHUB

31K2.5.0 2.3

Page 20: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

SharedPreferencesAndroid concepts

Page 21: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Activity != FragmentAndroid concepts

Page 22: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Plain and simple

Simple Android App

Page 23: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Plain and simple

Simple Android App

Page 24: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

With more code than it should

Demo

Page 25: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

To consider

Smalldetails

Page 26: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Base 64Android version

Page 27: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Base 64Android version

Page 28: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Useful LinksLast but not least

https://www.drupal.org/docs/8/core/modules/rest

https://www.drupal.org/project/restui

https://belitsoft.com/apps-development-services/responsi

ve-website-vs-mobile-app

https://github.com/yongt9412/Drupidroid

Page 29: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

I would like to thank to MD Systems for all their support.

Page 30: REST DRUPAL AND ANDROID THROUGH...Drupal 8 Developer at MD Systems CTO at Hubbing.net @yongt9412. Introduction Overview What we gonna talk about? 1 2 Existing approaches 3 Drupal side

Q&A

Thank you