Clean Architecture for Android: Creating scalable, maintainable, and testable native Android apps - 2nd Edition

· BPB Publications
Ebook
288
Pages

About this ebook

DESCRIPTION 

Clean architecture has been gaining traction in recent years as a way of developing scalable, testable, and maintainable Android applications. It works as well for single developers as it does for larger teams of many developers.


This book will take you through the ideas behind Clean Architecture. This new edition significantly expands the original content with detailed layer-by-layer implementation chapters, modern Jetpack Compose examples throughout, and triple the testing coverage, including the robot pattern and dedicated server mocking techniques. Lastly, it will provide you with real-life examples of applying the different principles of Clean Architecture and highlighting the benefits of adopting them.


By the end of this book, you should be comfortable developing Clean Architecture-based Android apps. Given a feature requirement, you would be able to break the implementation down into the different components required. Your code will benefit from high test coverage. It will be easy to modify and extend your app without needing to periodically rewrite it completely. Changes to the UI, API contracts or persistence solution will become easy and safe to implement.


WHAT YOU WILL LEARN

● How to develop a Clean Architecture Android app from the ground up.

● The steps for migrating an existing app to Clean Architecture.

● How to approach introducing a new feature.

● How to unit test the different classes of Clean Architecture apps.

● The rules for writing end-to-end tests to verify your app behavior.


WHO THIS BOOK IS FOR

This book is designed to help mobile developers in general and Android developers in particular. It caters to all skill levels. Knowledge of Kotlin would help the reader understand the provided examples, but is not necessary.


TABLE OF CONTENTS

1. Introduction

2. Clean Architecture Principles

3. The Domain Layer

4. The Presentation Layer

5. The UI Layer

6. The DataSource and Data Layers

7. Dependency Injection and Navigation

8. Unit Testing

9. End-to-end Testing

10. Mocking the Server

11. Failures and Exceptions

12. Implementing a New Feature

13. Dealing with Changes

14. Migrating an Existing Project

15. Other Bits and Bobs

Appendix XML and Views

Discover more

About the author

Eran Boudjnah has been developing apps and leading mobile teams for a wide range of clients, from start-ups (JustEat, Plume Design) to large-scale companies (Sky, HSBC) and conglomerates since 1997. He has been working with Android since around 2013.


Eran is a developer with almost three decades of experience in developing mobile applications, websites, desktop applications, and interactive attractions. He is passionate about board games (with a modest collection of a few hundred games) and has a 90's Transformers collection on display, of which he’s quite proud.


Eran lives in Brentwood, Essex, in the United Kingdom with Lea, his incredibly supportive wife.


Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.