Instant Spring for Android Starter
暫譯: 即時 Spring for Android 入門指南

Anthony Dahanne

  • 出版商: Packt Publishing
  • 出版日期: 2013-01-25
  • 售價: $1,260
  • 貴賓價: 9.5$1,197
  • 語言: 英文
  • 頁數: 72
  • 裝訂: Paperback
  • ISBN: 1782161902
  • ISBN-13: 9781782161905
  • 相關分類: AndroidJava 相關技術
  • 海外代購書籍(需單獨結帳)

商品描述

Leverage Spring for Android to create RESTful and OAuth Android apps

Overview

  • Learn something new in an Instant! A short, fast, focused guide delivering immediate results.
  • Learn what Spring for Android adds to the Android developer toolkit.
  • Learn how to debug your Android communication layer observing HTTP requests and responses.
  • Use OAuth to authenticate your users and your app against popular service providers (Google, Facebook, Twitter, and so on).

In Detail

The possibility to connect to remote web services is a key feature for most Android apps. REST (Representational State Transfer) is the most popular architecture to provide web services to mobile devices and others. OAuth has recently become the web's favorite way to authenticate and authorize users and apps, thanks to its capability to re-use popular web platforms accounts (Google, Facebook, Twitter). Spring for Android is an extension of the Spring Framework that aims to simplify the development of native Android applications.

"Instant Spring for Android Starter" is a practical, hands-on guide that provides you with a number of clear step-by-step exercises, which will help you take advantage of the abstractions offered by Spring for Android with regard to REST (RestTemplate) and OAuth (OAuthTemplate). It will also introduce you to the bases of those architectures and the associated tooling.

This book gets you started using Spring for Android, first letting you know how to set up your workspace to include those libraries in your projects (with the Eclipse IDE and also with the popular building tool Maven) and then providing some clear and real life examples of RESTful and OAUth backed Android applications.

After introducing the technology, we'll discover the different Message Converters provided (to consume JSON, XML, and Atom web services) and the main HTTP verbs to interact with RESTful webservices: GET, POST, DELETE, and UPDATE. We’ll also mention how to support HTTP Basic Auth, Gzip compression, and finally put in practice the OAuth workflow with a concrete example relying on the Google OAuth service provider to authenticate and authorize an app and users.

You will learn everything you need to consume RESTful web services, authenticate your users, and interact with their social platforms profiles from your Android app.

What you will learn from this book

  • Set up your Eclipse workspace to include third party libraries (such as Spring for Android).
  • Deal with dependencies using the Android Maven Plugin.
  • Use m2e and its m2e-android connector to work with Maven based Android projects in Eclipse.
  • Create an app connecting to a RESTful web service: using JSON, XML, and Atom messages.
  • Create an app connecting to a RESTful web service: creating, deleting, updating, and retrieving data to and from this service.
  • Enable HTTP BasicAuth and Gzip compression in your RESTful client app.
  • Use the third party library Android Annotations to simplify your RESTful app code.
  • Create an app authenticating the Google OAuth service provider and allowing access to the user basic and Google+ profiles.

Approach

Get to grips with a new technology, understand what it is and what it can do for you, and then get to work with the most important features and tasks. This is a Starter which gives you an introduction to Spring for Android with plenty of well-explained practical code examples.

商品描述(中文翻譯)

利用 Spring for Android 創建 RESTful 和 OAuth 的 Android 應用程式

概述
- 立即學習新知!一本短小、快速、專注的指南,提供即時結果。
- 了解 Spring for Android 為 Android 開發者工具包增添了什麼。
- 學習如何調試您的 Android 通信層,觀察 HTTP 請求和響應。
- 使用 OAuth 驗證您的用戶和應用程式,對接流行的服務提供商(如 Google、Facebook、Twitter 等)。

詳細內容
連接到遠端網路服務的能力是大多數 Android 應用程式的一個關鍵特性。REST(表現層狀態轉換)是為移動設備及其他設備提供網路服務的最流行架構。由於其能夠重用流行的網路平台帳戶(如 Google、Facebook、Twitter),OAuth 最近成為網路上最受歡迎的用戶和應用程式驗證與授權方式。Spring for Android 是 Spring Framework 的一個擴展,旨在簡化原生 Android 應用程式的開發。

《Instant Spring for Android Starter》是一本實用的、動手操作的指南,提供多個清晰的逐步練習,幫助您利用 Spring for Android 提供的抽象功能,特別是在 REST(RestTemplate)和 OAuth(OAuthTemplate)方面。它還將介紹這些架構的基礎及相關工具。

本書將幫助您開始使用 Spring for Android,首先讓您了解如何設置工作區以在項目中包含這些庫(使用 Eclipse IDE 以及流行的構建工具 Maven),然後提供一些清晰且真實的 RESTful 和 OAuth 支持的 Android 應用程式範例。

在介紹技術後,我們將探索提供的不同消息轉換器(以消費 JSON、XML 和 Atom 網路服務)以及與 RESTful 網路服務互動的主要 HTTP 動詞:GET、POST、DELETE 和 UPDATE。我們還將提到如何支持 HTTP Basic Auth、Gzip 壓縮,並最終實踐 OAuth 工作流程,通過依賴 Google OAuth 服務提供商來驗證和授權應用程式及用戶的具體範例。

您將學會消費 RESTful 網路服務、驗證用戶以及從您的 Android 應用程式與社交平台資料互動所需的一切。

您將從本書中學到的內容
- 設置您的 Eclipse 工作區以包含第三方庫(如 Spring for Android)。
- 使用 Android Maven Plugin 處理依賴項。
- 使用 m2e 及其 m2e-android 連接器在 Eclipse 中處理基於 Maven 的 Android 項目。
- 創建一個連接到 RESTful 網路服務的應用程式:使用 JSON、XML 和 Atom 消息。
- 創建一個連接到 RESTful 網路服務的應用程式:創建、刪除、更新和檢索該服務的數據。
- 在您的 RESTful 客戶端應用程式中啟用 HTTP BasicAuth 和 Gzip 壓縮。
- 使用第三方庫 Android Annotations 簡化您的 RESTful 應用程式代碼。
- 創建一個驗證 Google OAuth 服務提供商的應用程式,並允許訪問用戶的基本資料和 Google+ 資料。

方法
掌握一項新技術,了解它是什麼以及它能為您做什麼,然後開始使用最重要的功能和任務。這是一本入門書,為您介紹 Spring for Android,並提供大量解釋清晰的實用代碼範例。

最後瀏覽商品 (20)