[JAVA] I read the Kotlin startbook

About the book I read

[Kotlin Startbook-New Android Programming](https://www.amazon.co.jp/Kotlin Startbook-New Android Programming-Nagasawa-Taro / dp / 4865940391)

--Author: Taro Nagasawa --Published: July 2016

Assumed environment

reference

-I wrote "Kotlin Startbook-New Android Programming" ~ -Read: Kotlin Startbook-New Android Programming / by Taro Nagasawa -[Book Review] Kotlin Startbook is the standard for Kotlin development

Impressions

Trigger

Originally I liked Kotlin and studied by reading the Official Reference and reading the Qiita article. Under such circumstances, Android officially supports Kotlin, and I suddenly stopped by. This book was recommended by a bookstore with POP, so I bought it.

Part 1: First Kotlin

The features of Kotlin and the introduction method of the development environment are summarized very compactly. I didn't have to explain the introductory procedure, which is often in the introductory book, with a lot of screenshots, so I read it without stress. As mentioned at the beginning, since the target audience is people who know Java and Android, I think that it is a very good book for those who want to efficiently absorb only the differences from them.

In particular, the Kotlin Guided Tour in Chapter 3 contains sample programs that reflect Kotlin's features abundantly. If you're wondering whether to learn Kotlin for the time being, read this chapter alone and experience Kotlin's smartness.

Part 2: Kotlin Grammar Details

It is an image that explains the contents written in Official Reference with detailed explanations in Japanese. The sample code is also included on the page, so understanding is quick. Personally, I couldn't understand the story of displacement by reading the English reference, but I feel like I understood it. And, as mentioned at the beginning, the basic grammar is compactly summarized in Part 1, so if you have that knowledge and Java knowledge, you can write Kotlin. The content of Part 2 is for those who want to know more deeply.

However, the version at the time this book was written was 1.0.2, and now it's 1.1.2-5, so I'll supplement some small topics later.

Part 3: Sample programming

A sample Android app using Kotlin is introduced. Kotlin has become the official development language, so I think it's in great demand. I thought that the introduction part was a little too polite for those who have experience in Android development, but it will be very educational because there is a detailed explanation of Kotlin-like writing style and its effect.

In the second half, a sample for calling existing libraries (Retrofit, RxAndroid, GSON, Glide, RxLifecycle, Espresso, Dagger2, Mockito, Kotlin Knife, Kotlin Android Extensions, Data Binding, Anko) from Kotlin is introduced. In my case, I haven't used half of them in the first place, so I'm glad I could study with a sample that works how to use the library before Kotlin.

Appendix

There are detailed tips and lists. I don't know how comprehensive it is, but it also summarizes the points to note when coexisting Java and Kotlin, so while keeping the project written in Java, gradually introduce the classes written in Kotlin. You can also use it like going.

Summary

I thought it would be useful for anyone who wants to know what Kotlin is, who wants to study hard, or who wants to use it for Android development. I recommend it.

By the way, what is the red beak on the cover? Also, is this book called "Akabeko book" in the neighborhood? I'm worried if I'm ashamed to say, "If you want to do Kotlin, you must have a red beko book."

Recommended Posts

I read the Kotlin startbook
I read the Kotlin startbook
I read the source of Integer
I read the source of Long
I read the source of Short
I read the source of Byte
I read the source of String
I read the "Object-Oriented Practical Guide", so a memorandum
I investigated the enclosing instance.
I can read it! RxJava
I tried to summarize the basics of kotlin and java
I summarized the collection framework.
I tried the Docker tutorial!
I tried the VueJS tutorial!
I read module-info.java in java.base
I tried the FizzBuzz problem
[Java] I implemented the combination.
I tried node-jt400 (IFS read)
I studied the constructor (java)
What I learned about Kotlin
I want to return to the previous screen with kotlin and java!
I tried to explain the method
I tried the Java framework "Quarkus"
[Rails] I tried deleting the application
The story I wanted to unzip
The guy who tries-with-resources with kotlin
I tried running gRPC's Quick Start (Kotlin version), but it was difficult to read the Gradle script.