Slide 1

Slide 1 text

Spring for Android Dimas Ragil T. Brownbag Onebit Friday,6th November 2015

Slide 2

Slide 2 text

What is? 〉 Spring for Android is an extension of the Spring Framework that aims to simplify the development of native Android applications. 〉 http://projects.spring.io/spring-android/

Slide 3

Slide 3 text

Its Magic? 〉 Spring for Android is a framework that is designed to provide components of the Spring family of projects for use in Android apps. Like all Spring projects, the real power of Spring for Android is found in how easily it can be extended.

Slide 4

Slide 4 text

Features 〉 A Rest Client for Android 〉 Auth support for accessing secure APIs

Slide 5

Slide 5 text

Management System 〉 Maven 〉 Gradle

Slide 6

Slide 6 text

Combo Attack 〉 Gson 〉 Json

Slide 7

Slide 7 text

How use? 〉 // The connection URL 〉 String url = "https://ajax.googleapis.com/ajax/" + 〉 "services/search/web?v=1.0&q={query}"; 〉 // Create a new RestTemplate instance 〉 RestTemplate restTemplate = new RestTemplate(); 〉 // Add the String message converter 〉 restTemplate.getMessageConverters().add(new StringHttpMessageConverter()); 〉 // Make the HTTP GET request, marshaling the response to a String 〉 String result = restTemplate.getForObject(url, String.class, "Android");

Slide 8

Slide 8 text

Example 〉 https://github.com/dynastymasra/JsonParser 〉 http://spring.io/guides/gs/consuming-rest-android/ 〉 http://spring.io/guides/gs/consuming-rest-xml-android/ 〉 https://github.com/spring-projects/spring-android-samples

Slide 9

Slide 9 text

Next Features 〉 Retrofit?