|Programming Kotlin Applications (Wrox)|
Kotlin applications - what applications in particular?
The subtitle is "Building Mobile and Server-Side Applications with Kotlin" which sounds great, but applications are not really the focus of this book. What it is is a wander through the interesting parts of Kotlin. This is fine, but as I was reading it I was constantly worried that what I was reading might not be complete or that I might have missed something. The presentation isn't logical so there is no way you can follow a thread of topics and feel secure that you are on the right track. Instead what we have is thirteen chapters of topics on single themes, but without any real organization. As to applications - well I couldn't find any.
The IDE used is IntelliJ and this is reasonable but if you are thinking mobile applications then it's Android Studio you need - but this just gets a brief mention at the end. You don't even get to see a mobile app or a server side app developed using IntelliJ. Instead this is just about the basics of the language.
The first four chapters are about objects and classes, a reasonable place to start, but you have to take into account that Chapter 7 is on control structures and that might be a better place to start. In general the material assumes that you are an object-oriented novice. but the next second the level changes to intermediate Kotlin and you are looking at hashCode(). We also look at nullable types. This is not a logical account of Kotlin's object-oriented approach.
Chapter 5 deals with collections and I think this is too early given we haven't gone over basics like control structures. The same comment applies to Chapter 6 on Generics - it just isn't this important. Most Kotlin programmers will be consumers of generic classes not producers. What a shock then to reach Chapter 7 and discover that we are back in the land of If..then..Else. and sections titled "For is for looping".
Chapter 8 deals with data classes and spends far too much time on a simple idea. Chapter 9 follows on with enums and other special classes. Chapter 10 is about functions and this is a big area where Kotlin has made things more sophisticated. Again my main concern was the lack of logical organization.
Chapter 11 is supposed to be about idiomatic Kotlin but is actually about scoped functions. Is this all there is to say about idiomatic Kotlin? Chapter 12 returns to inheritance and it deals with things that weren't covered earlier for no particular reason.
The final chapter discusses Kotlin for Android, but really doesn't say anything helpful, and then goes on to compare Java and Kotlin and explains that they can work together. As one of the huge advantages of Kotlin is that it interoperates with Java this is a little late and not really enough.
You might get the impression that I'm not happy with this book and you would be right. It isn't about applications. it is a rambling introduction to the Kotlin language. Most of the time the explanations are not particularly helpful and are mostly concerned with being cute rather than clear. This said, I can well imagine that there are readers who will want a discursive journey through some parts of the Kotlin language without too much emphasis on why Kotlin is a better Java.
|Last Updated ( Tuesday, 19 October 2021 )|