Instant Spring for Android Starter

0
(0)

Instant Spring for Android Starter
 

  • Author:Anthony Dahanne
  • Length: 72 pages
  • Edition: 1
  • Publisher: Packt Publishing
  • Publication Date: 2013-01-25
  • ISBN-10: 1782161902
  • ISBN-13: 9781782161905
  • Sales Rank: #13038878 (See Top 100 Books)
  • Download:Register/Login to Download
  • Buy Print:Buy from amazon


    Book Description

    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.

    中文:

    书名:Instant Spring for Android Starter

    利用Spring for Android创建RESTful和OAuth Android应用程序

    Overview

    • 一下子学到新东西!一份简短、快速、专注的指南,能立竿见影。
    • 了解Spring for Android向Android开发人员工具包添加了什么。
    • 了解如何通过观察HTTP请求和响应来调试Android通信层。
    • 使用OAuth针对流行的服务提供商(Google、Facebook、Twitter等)验证您的用户和应用程序。

    In Detail

    能够连接到远程网络服务是大多数Android应用程序的一个关键功能。REST(表述性状态转移)是向移动设备和其他设备提供Web服务的最流行的架构。OAuth最近已经成为网络上最受欢迎的认证和授权用户和应用程序的方式,这要归功于它能够重复使用流行的网络平台账户(谷歌、Facebook、Twitter)。Spring for Android是Spring框架的扩展,旨在简化原生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 Web服务)以及用于与REST风格的Web服务交互的主要HTTP动词:GET、POST、DELETE和UPDATE。我们还将提到如何支持HTTP基本身份验证、GZIP压缩,最后通过一个依赖于Google OAuth服务提供商对应用程序和用户进行身份验证和授权的具体示例来实践OAuth工作流。

    您将了解使用REST风格的Web服务、验证您的用户以及通过您的Android应用程序与他们的社交平台档案进行交互所需的一切。

    你将从这本书中学到什么

    • 设置您的Eclipse工作区以包括第三方库(如Spring for Android)。
    • 使用Android Maven插件处理依赖项。
    • 使用M2E及其M2E-Android连接器在Eclipse中处理基于Maven的Android项目。
    • 创建连接到REST风格的Web服务的应用程序:使用JSON、XML和Atom消息。
    • 创建连接到REST风格的Web服务的应用程序:在此服务中创建、删除、更新和检索数据。
    • 在您的RESTful客户端应用程序中启用HTTP BasicAuth和GZIP压缩。
    • Use the third party library Android Annotations to simplify your RESTful app code.
    • 创建一个应用程序来验证Google OAuth服务提供商,并允许访问用户基本配置文件和Google+配置文件。

    Approach

    掌握一项新技术,了解它是什么以及它能为您做什么,然后开始使用最重要的功能和任务。这是一个入门教程,介绍了Spring for Android,并提供了大量经过良好解释的实用代码示例。

  • 下载电子版:下载地址
  • 购买纸质版:亚马逊商城

    点击星号评分!

    平均分 0 / 5. 投票数: 0

    还没有投票!请为他投一票。

  • 推荐阅读

    评论 抢沙发

    评论前必须登录!

     

    登录

    找回密码

    注册