Android Programming: The Big Nerd Ranch Guide (5e)

Authors: Bryan SillsBrian Gardner, Brian Hardy and Kristin Marsicano
Publisher: Addison-Wesley
Pages: 688
ISBN: 978-0137645541
Print: 0137645546
Kindle: B09WLF84W7
Audience: Kotlin programmers
Rating: 4.5
Reviewer: Mike James  

The Big Nerd Ranch Guide to Android is back with a fifth edition. It now covers Compose - but only just.

You would have to be MAD to write a book on Android at the moment, but the Big Nerd guys have invested the time to produce the best part of 700 pages of hard work. Yes, it is a new edition rather than a whole new book, but Android keeps changing the rules so fast that will be out of date before the year is out. The problem is that Android Studio is changed in ways that aren't backward compatible multiple times a year. What is worse is that the Android team introduce new ways of doing things at the drop of a hat. Currently they talk about MAD - Modern Android Development - and imply that this is the way to go for the future, but they leave the existing system in a state of limbo. Should you learn the old ways or jump into MAD with both feet?

The Big Nerd Ranch guys think that there is still value in the old way of doing things and I agree with them. But be aware that reading this book you are learning last year's technology and even if you do go MAD it will probably be out of date by next year.

Banner

The first chapter gets you started with Android Studio.The version is Bumblebee which came out in April 2022 and there have ready been five new stable versions and it won't be long before Hedgehog is out. I don't think any of the changes should affect the book, but this is more to do with the way the Android team are pretty much ignoring the old ways of doing things in favor of adding new features.

It goes without saying that the book only uses Kotlin and you need to be reasonably familiar with the language to get much from the book.

You learn about the very basics of Android by implementing a simple example - a quiz app. There is a drag-and-drop editor - which admittedly is probably going to be phased out any day  but it is much easier to use then the XML that it generated - which is also going to be phased out soon. There really is no need to be confronted with the XML until you have your first application running and have seen some of the other aspects of Android programming. From here we slowly build up the app by adding events, an icon and worrying about screen resolutions. 

Chapters 3 and 4 consider the problem of the lifecycle and what happens when the app is shut down and restarted - something that doesn't happen under other operating systems. From here we take a look at debugging and testing.

 

Chapter 7 introduces a second activity and Chapter 8 deals with the problems of multiple SDKs. Chapter 9 opens up the difficult topic of fragments, which is a bit strange because it comes before a deeper treatment of the UI in chapters 10 and 11. This seems unnecessarily cruel to the beginner. Much better to deal with a non-fragment-based UI and then deal with this difficult topic later. It isn't even obvious that Fragments are a good idea anyway, and many Android programmers have given up on them or rarely use them.

The next few chapters - up to Chapter 14 are all about the UI including dialog boxes, the action bar and so on. The Android Studio designer is used and so is the constraint layout which is the recommended way of doing things - if you aren't moving to MAD. Chapter 12 deals with the relatively new Kotlin feature of coroutines and how they can be used with a database. Then more on fragments, dialogs and the app bar.

From here the book starts to jump around to cover all of the separate topics that makes up Android: using implicit intents, taking photos, localization, accessibility, networking and so on. It also covers WorkManger, touch events and animation. The final four chapters cover Jetpack compose and it is very much like starting the book over with a completely different way to build a UI. In 60 pages it does a reasonable job of introducing the MAD approach but it make you wonder why you have bothered learning difficult things like fragments. This part of the book, about 60 pages in total, is the part that is most likely to go out of date soon. Compose is developing rapidly and the tools that are available to make use of it are changing almost faster than Android Studio itself.

You can tell that the book covers a lot of ground in its 700 or so pages. However, each chapter is short and as the book progresses the level of explanation starts to decrease. The order that the topics are introduced in is very much driven by the examples that are used. This is fine when you are reading the book chapter by chapter, but less satisfactory if you need to find out about a topic and jump into the middle of something.

There is also a mix of the very basic and the more advanced - the advanced ideas are needed to get the example project progressed but if a simpler example had been chosen then the advanced ideas could have been kept for later. 

As long as you are a smart programmer this shouldn't be too much of a problem, but if you really are a beginner then you are likely to find it overwhelming. To be honest, Android is  overwhelming as it is a big and complex programming environment which this book documents, but does little to make seem easier or simpler. The introduction of MAD and the lack of guidance from the Android team about what features of the existing API are about to be depreciated makes it even harder to get your head around. This book really raises the question of what a coherent account of Android would look like today because this isn't it. It is, however, a welcome attempt at presenting almost everything Android.

 

Banner


C++ Programming, 6th Ed (In Easy Steps)

Author: Mike McGrath
Publisher: In Easy Steps
Date: April 2022
Pages: 192
ISBN: 978-1840789713
Print: 1840789719
Kindle: B09V2T9SJD
Audience: Developers wanting to learn C++
Reviewer: Mike James
This is the 6th edition of a slim book on C++. Can you really learn C++ in easy steps?



Programming with Rust

Author:  Donis Marshall
Publisher: Addison-Wesley
Pages: 400
ISBN: 978-0137889655
Print: 0137889658
Kindle: B0CLL1TGVT
Audience: Programmers wanting to learn Rust
Rating: 3
Reviewer: Mike James
Rust is the language we all want to learn at the moment so this is just in time.


More Reviews

Last Updated ( Wednesday, 02 August 2023 )