Sorry guys, I have been underground for a while and frankly speaking I wasn’t doing anything fancy. :[ But now I am back and meanwhile, I have learned MVP, Android Architecture Components, and Kotlin 🧡.
I have made a switch to Kotlin in all of my projects. And that’s the reason that all the upcoming articles on The Engineers Cafe will be written in Kotlin.
I am writing this article to put some light on the benefits of Kotlin, help you in getting started with it and also motivate your friends working in Android to do the same.
What is Kotlin?
According to Wikipedia,
It is interoperable with Java and you can use it side by side in your Android project.
Why switch to Kotlin?
There are many reasons to shift to Kotlin. I am listing the ones which I think are the most important and convinced me to switch to Kotlin for Android development 😎
- It is officially supported by Google for Android development and comes directly included with Android Studio 3.0 and above. Google declared first-class support for Kotlin on Android at Google I/O 2017.
- Kotlin is interoperable with Java and hence you can gradually include it in the project.
- Extension functions are bliss.
- No semicolons, no new keywords, and no findViewByIds 😛.
- No more famous Null Pointer Exceptions.
- Less boilerplate code.
- A very positive feedback from the community along with the increasing adoption.
- Lots of tutorials and quality courses already available.
- It is open source.
If you are an experienced Android developer but a newbie to Kotlin, I recommend going through the Kotlin documentation. It would be a good starting point and reading books listed below can also help you to get expertise over the Kotlin programming language.
- Kotlin Programming: The Big Nerd Ranch Guide
- Kotlin in Action
- Android Apprentice: Beginning Android Development with Kotlin 1.2
- Kotlin for Android Developers: Learn Kotlin while developing an Android App
- Kotlin Programming Cookbook
You may also want to have a look at this free boot camp course on Udacity by Google.
Also, I recommend following all the Google Developer Experts for Kotlin on Social Media. These experts do a great job of sharing quality content with the community. This content can help you a lot in increasing your knowledge and staying up to date with the latest trends in Android programming.
P.S. All the upcoming Android Tutorials on The Engineers Cafe will be written in Kotlin. If you haven’t made your mind to switch to Kotlin, this may give you some extra motivation 😬
Do tell me your views in the comments section and if you are a JAVA fan, we have a lot to discuss :]