First of all, I want to mention that I’m not a professional Android developer. I see mobile development as a hobby. So I visited droidcon purely out of personal interest and curiosity.
This year’s droidcon was co-located with IFA at Messe Berlin, the international consumer electronics fair. So all attendees were granted free entrance to it. However, after spending some time at all the expensive TVs and home appliances, I quickly discovered that the program at droidcon was much more interesting.
Droidcon started with a bar camp on Sunday and continued with two days fully packed with different talks and workshops. Here are some of the highlights.
Kotlin everywhere
The first thing I noticed that was prominent throughout the whole convention was a heavy shift from Java as primary language over to Kotlin. This relatively new programming language from JetBrains is quite popular in the Android community for some time now. But after the official announcement at this year’s Google I/O Kotlin’s usage almost exploded. You get the feeling that nobody is writing a single line of Java code anymore. Maybe except for the case where you write awful Java code and then compare it to the conciseness and beauty of Kotlin.
I know that Kotlin is awesome, but it impresses me over and over again. For example, look what @PreusslerBerlin demonstrated during a live coding session. One rewriting of his unit tests eventually led to some kind of custom DSL with infixes. If you take a look at line 11 you can read it almost like natural language.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.jodamob.kotlin.droidcon.e | |
import org.amshove.kluent.`should contain` | |
import org.amshove.kluent.`should equal` | |
import org.junit.Test | |
import kotlin.reflect.KFunction1 | |
class GreeterTest { | |
val tested = Greeter() | |
@Test | |
fun `should greet the conference`() { | |
calling {tested::greet} with "Droidcon" `should equal` "Hello Droidcon" | |
} | |
fun calling(function: () -> KFunction1<String, String>) = function | |
infix fun (() -> KFunction1<String, String>).with(argument : String) : String = | |
invoke().invoke(argument) | |
@Test | |
fun should_be_interntional() { | |
val greetings = tested.someGreetings | |
greetings `should contain` "Hallo" | |
} | |
} |
There are more features why I suggest you should give Kotlin a try:
- Everybody is writing extension functions. It’s just so convenient to write a custom member function to built-in or other library classes you don’t have access to. Extension function are known for example from C#. Once you get used to it never want to miss it.
- Jetbrains’ @sveta_isakova talked about coroutines. These lightweight threads make (massive) parallel computing a lot easier. And again, this concept was inspired by C#.
Other Highlights
The talks ranged very broadly from high-level, such as marketing and privacy, down to very low level. In a talk by @realm we found ourselves hunting for bugs in native code. Yes, we even went down to assembly together and found the problem in the compiler built-in memmove()
function.
One of my personal revelations happened in “Scaling Android @Facebook”. To keep their huge code base under control, they only develop on master branch and use gatekeepers to activate new features. As a result, Facebook avoids unfeasible merges and unfinished features are well hidden behind their gates. As an extra, feature release can be scheduled precisely, e.g. all users get access at the same time or staged rollouts.
Finally, Android developers tend to be very sensible of clean architecture. With the release of Android Architecture Components at this year’s Google I/O, Android now presented official recommendations for app architecture. Naturally, this topic was picked up by several talks about ViewModels, LiveData and similar.
Conclusion
Droidcon Berlin 2017 was my personal highlight with high quality talks about technical and other related topics about Android development. This year’s headline could have been “All things Kotlin”, because Kotlin is just awesome.
I’m looking forward to next year and highly recommend you to attend droidcon Berlin 2018 if you are interested in Android development. And if you can’t wait hurry up to save your ticket for droidconSF on November 5-6, 2017 @ Mission Bay Conference Center, San Francisco.