End to End Android Development
End to End Android Development
$57.99
Regular Price
$49.99
Bundle Price

End to End Android Development

Retrofit: Love Working with APIs on Android
A Practical Approach to API Design
The following 2 books are included in this bundle...

About the Bundle

We've all seen it. That amazing app that solved all your problems.. and turned your phone into a coffee warmer.

The developer had a great idea but is doing too much work on the device. It's downloading too much data, trying to process it locally, keeping connections open, and killing your battery cutting you off from everything and everyone.

The only solution is to move that work off the phone and back to the server via APIs. To do that well, your API has to be well planned, thoughtfully designed, and easy to use.

With this bundle, you'll be equipped to design and build API-driven Android apps from the frontend to the backend.

In A Practical Approach to API Design, we work to help you understand who will be using your API and why, what problems you need to prepare for, and how to solve many of those problems. Nouns, verbs, routing, and versioning are all discussed to make sure you build the right thing.

In Retrofit: Love Working with APIs on Android, we'll dig into what it takes to build Android clients that can handle the features and functionality that your application needs. We'll demonstrate how to authenticate via processes like OAuth 2.0, upload files properly, handle errors, and generally build and release an application you can be proud of.

The target audience for this bundle is developers who need to architect an application from front end to back end, already know the basics of Android, have experience with a backend programming language, and want to add Retrofit to their toolbox to use the great APIs they're designing.

  • Share this bundle

About the Books

Retrofit: Love Working with APIs on Android

Retrofit: Love Working with APIs on Android

Take delight in building API clients on Android.
  • 369

    Readers

  • 292

    Pages

  • 68,259

    Words

  • 100%

    Complete

  • PDF

  • EPUB

  • MOBI

  • APP

Painless Networking with Retrofit

The content of this book is completely updated to Retrofit 2.3!

Every modern Android app needs to connect to at least one private or public API. Interacting with services can be difficult due to the extreme variety of request and response formats. Depending on the API, you’ll need to change your request payloads, authentication, data formats, and much more.

Retrofit: a type-safe HTTP client for Android and Java

Retrofit handles all of the complicated and repetitive parts of network implementations for you. It hides the entire network layer, from creating a connection to processing the handling on a separate thread, from you. Retrofit even does the mapping of the requests and responses to Java objects for you (e.g., creating a JSON payload from your passed List<User>). You only need to describe what and how you want to send or receive it.

This awesomeness comes at a cost: an initial learning curve. Retrofit might look a little more complicated at the beginning, but pays off multiple times in the long run.

If you’re thinking about using Retrofit, or haven’t developed a deep knowledge of it yet, you’ll benefit from this book. We’ve created this book with the vision of being the ultimate guide to understanding Retrofit. After working through this book, you’ll be able to connect to new APIs and services within minutes.

You can find a Retrofit tutorial series on our website and our free video tutorial series on YouTube, where we describe some elements of Retrofit. The book extends and connects these tutorials into one common thread that guides you through all important aspects of Retrofit. The chapters are structured in a way that rewards a linear reading. Retrofit rookies can and should read it cover to cover. Experienced Retrofit developers can jump to specific sections for guides on how to solve their specific problem.

What Topics Are Covered in This Book?

The list below provides a comprehensive overview of covered topics in the book.

  • Introduction to Retrofit
  • Quick Start Guide to jump right into Retrofit
  • Creating a sustainable Android REST client
  • Extensive manipulation and customization of requests (e.g., query and path parameters, form-urlencoding, synchronous vs. asynchronous)
  • Cancel, analyze and re-use requests
  • Comprehensive overview of response converters and data mapping with plenty practical examples of applied (custom) converters
  • Implementing and handling authentication (basic, token, OAuth, hawk) in a smart way
  • File uploads, including multiple and dynamic amounts of files (optionally with progress updates)
  • File download (optionally with progress updates)
  • Detailed chapter on implementing pagination
  • Introduction and example of possible ways to deal with errors in a clean way
  • Debug requests and responses using three logging tools (OkHttp, Stetho, Android Studio Profiler)
  • Fundamentals for mocking server responses
  • Entire chapter on practical examples of custom converters dealing with specific scenarios
  • Extensive chapter on implementing response caching with Retrofit
  • Example for an offline mode based on cached server responses
  • A chapter with practical tips & tricks for Retrofit
  • App release preparation including ProGuard configuration

Additionally to the regular content we provide an appendix with three sections:

  • Upgrade guide from Retrofit 1.9 to 2.0
  • Java basics for Retrofit
  • Network basics for developers, who just started interacting with APIs

Who Is This Book For?

In short: this book is for you. We believe that every developer reading this book will take away new ideas on how to optimize their Android apps in the sense of interacting with APIs or web services using Retrofit. You’ll recognize goodies that are applicable for the projects you’re working on.

This book is for Android developers, who want to receive a substantial overview and reference book on Retrofit. You’ll benefit from clearly recognizable code examples related to your daily work with Retrofit.

Rookie

If you’re just starting out with Retrofit (or coming from another HTTP library like Android Asynchronous Http Client or Volley) this book will show you all important parts on how to create sustainable REST clients on Android. The provided code snippets let you jumpstart and create your first successful API client within minutes!

Expert

If you’ve already worked with Retrofit, you’ll profit from our extensive code snippets and apply the learnings to your existing code base. Additionally, the book illustrates various use cases for different functionalities and setups like authentication against different backends, request composition, file uploads and downloads, and much more!

One focus of this book is not only to implement the requirements, but also do so in a clean way. We’ve seen way to many complicated and messy usages of Retrofit. We focus on providing code samples which adhere to clean code standards. We avoid any unnecessary duplication at all costs. This has the side effect of some extra app performance gains by efficient Java object handling.

Source Code Samples

With the purchase of this book, you benefit from the sample project that awaits your download within the extras section on Leanpub. The sample project is an Android project based on gradle. You can directly touch and use classes that are only illustrated in excerpts within this book.

Check your Leanpub Library and select Retrofit: Love working with APIs on Android to download the sample code base.

Continuous Updates

We’ve published the first version of this Retrofit book in July 2015. Since this initial release we’ve extended and updated the book more than a dozen times. Once you buy the book, you get all future updates for free. Even if it’s a huge Retrofit update, for example from version 1.9 to 2.0. With every new release of Retrofit we’ll evaluate the entire book content and update it accordingly.

Of course, we’re listening to your feedback and add new sections and even chapters, if it can be useful to all readers. If you still have a question after reading this book, let us know and we might be able to help!

Still Unsure?

If you’re still on the fence if this book helps you, checkout the sample or, even better, use Leanpub’s (and our) happiness guarantee. Try this book out and if you don’t think this book provides enough value, you can refund your money within 45 days with no questions asked. You don’t have any risk in testing this book, which saves you hours of headaches and makes your Android app code so much cleaner.

Final Note: Retrofit Book for Version 1.9

The current version of this book is fully focused on Retrofit 2.x, no hint or code snippet that points to Retrofit 1. If you’re interested in the first version of the book that based on Retrofit 1, please visit this book’s extras page on Leanpub. As a reader of this book, the first version is also available for you!

A Practical Approach to API Design

A Practical Approach to API Design

From Principles to Practice
  • 1,574

    Readers

  • 80

    Pages

  • 28,224

    Words

  • 90%

    Complete

  • PDF

  • EPUB

  • MOBI

  • APP

If you read the tech press, everyone knows they need an API but most aren't really sure what it is. They treat it as another checkbox like "Web 2.0" was a few years ago or a mobile app was most recently. In fact, there’s an entire “API-first” movement in development circles that most people don’t understand or even realize why. In this book, we'll start by discussing the what an API is, why you might need one, and follow up with the how to build one.

This book is incomplete, lacking one last appendix. As a result, we hope this book becomes a conversation as we continue writing. When you find something interesting, let us know. If you think we’re wrong, say so. If you think we’re right, tell your friends. If you want us to teach your team more and deeper concepts, please let us know.

Towards that goal, we have one remaining chapter on our drawing board:

  • API Design Patterns
    • Idempotency
    • SOLID Design Principles
    • Naming - Resources & Parameters
    • Transactions
    • Authorization - Tokens vs Credentials
    • Link Relations
    • Composites
    • Versioning
    • Pagination
    • Error Handling
    • Caching - Strategies & ETags
    • Hard vs Soft Deletes

About the Authors

Marcus Pöhls
Marcus Pöhls

Marcus is an enthusiastic Android & Java developer. He’s developed multiple production-ready client and server applications. While following the core principle of performance for client apps, he also builds REST+JSON APIs that focus on clear and consistent design.

Besides his day job, sharing knowledge and teaching others has become a characteristic he never wants to miss.

Marcus has a Master’s degree in computer science from the Otto von Guericke University Magdeburg.

Feel free to get in touch on Twitter @marcuspoehls.

D. Keith Casey Jr
D. Keith Casey Jr

Keith Casey is a problem solver with over a decade of experience in software development in general and project management specifically. He has seen projects and teams that run like clockwork accomplishing amazing things and others that make the Titanic look like a pleasure cruise. He discovered pretty quickly that the only way to avoid the iceberg is to get the right information to the right people as quickly as possible.

Keith started his career at the Library of Congress in Washington, DC where he was working to answer the ultimate geek question "how much data is in the Library of Congress?" During that work, he drafted two of the XML standards still in use by the Library for Audio and Video metadata collection. On the technical side, he developed FoxNews' mobile sites (pre-iPhone) from concept to launch in 45 days; the voting system for live musical performance show; the news syndication system for Cygnus Business Media (65 sites across 8 verticals); and the Drupal-based syndication system for a professional sports league and its teams.

In 2011, he joined Twilio as a Developer Evangelist bringing communications APIs to the world. In those two years, he led most outreach efforts within the central US and the larger PHP community. Further, he's led many customer-focused efforts to help them use the API in new and creative ways to drive their own revenue and customer experiences. He is currently an working with a number of companies on API design principles, software quality assurance, and software project triage and recovery.

James Higginbotham
James Higginbotham

James Higginbotham has over 15 years of experience and has architected, built, and deployed software products for both Fortune 500 companies and early-stage startups. He combines his love of software with a focus on the product experience to create a balance between the complexity of scalability and ease of use.

His experience with both startups and the Fortune 500 provides deep insight into accelerating product development at any scale. James has delivered a wide variety of solutions for the healthcare, commercial insurance, non-profit, and airline industries. His solutions include software-as-a-service, supply chain management, and building multi-sided marketplace solutions. 

James has deployed to the public cloud and internal data centers. His goal is to design and build software that balances the complexity of scalability and distributed computing with the ease of a modular, testable codebase. He believes that APIs should be designed to solve problems based on the workflows of the industry while providing a great developer experience.

He is the founder of an Austin-based services company that focuses on API design, development, and cloud infrastructure. 

The Leanpub Unconditional, No Risk, 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms

Write and Publish on Leanpub

Authors and publishers use Leanpub to publish amazing in-progress and completed ebooks, just like this one. You can use Leanpub to write, publish and sell your book as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub