Droidcon UK ’18

By 29/10/2018Uncategorized

Every year Skills Matter organizes Droidcon, the premier Android conference, in Europe in Islington, London. 3 Android developers of JArchitects were given the opportunity to attend this event to grow their skills and connect with other passionate Android developers.

The event is spread out over 2 days and features several keynotes by prominent Android community members such as Chet Haase, Florina Muntenescu, Romain Guy and Hadi Hariri and many other talks and workshops given by Jake Wharton, Huyen Tue Dao, Christina Lee and many many more.

There was a huge range of subjects, from application architecture to distribution to VR and UI libraries.

Apart from the keynotes, there were 5 concurrent tracks to follow, so it was impossible to follow all the talks, but we’d like to put some highlight talks in the spotlight.

 

Pragmatic Crafting by Florina Muntenescu

video

Florina Muntenescu, Android Developer Advocate at Google, told her experience working together with a small team to revive Plaid, an app originally made by Nick Butcher to showcase Material Design in a real application.

They set out to make the app work again and to modernize the application architecture.

She explained how they took a pragmatic approach and found a balance between spending too much time and complexity on architecture, while still keeping the code maintainable and modularized. They did this by agreeing on a set of rules and guidelines with common goals to create a common language in the team.

 

Trash Talk: The Evolution of Garbage Collection on Android by Chet Haase and Romain Guy.

video

In this keynote, Chet Haase and Romain Guy tried to explain more about the garbage collection on Android. The similarities and differences of the Dalvik and newer ART garbage collection were compared and the hidden cost of object allocation was shown. The main takeaway was that from Android 5.0 there is a much smaller performance impact when allocating objects, even big ones. Except for in special cases where there is a huge amount of objects in a very performance critical loop, the choice should be in favor of developer ease rather than optimization. This is especially relevant thinking about the hidden costs of Kotlin, where for example lambda’s can cause some overhead by generating extra objects. But in the end, it’s usually with a neglectable performance impact.

 

Refactoring to Functional by Hadi Hariri

video

Another keynote was by Hadi Hariri, developer and technical evangelist at JetBrains, the makers of Kotlin.  He tried to give a glimpse into functional programming, explaining why it’s not necessarily something to be scared of. You should not think of programming as fully object-oriented, or fully functional. These days many Android developers are already using some functional aspects, for example, the Kotlin collection operators filter and map. This means that a lot of developers are already somewhere on the line between object-oriented and functional, and developers should try to find a spot on this line which they are comfortable with.

 

Helping Dagger Help You by Jake Wharton

video

Jake Wharton’s talk was the only one tagged as ‘Advanced’ on the schedule, and because of this, he didn’t hold back.

He focused on 2 aspects of Dagger that cause inconvenience for developers, giving some ideas on how to solve or mitigate them, with a focus on minimizing the amount of boilerplate code to write.

One aspect was the inability to inject dynamic parameters in injected classes. This causes some classes to be more stateful than you might want. The object created by the dagger provider might need some other information to properly work, for example, an ID in a presenter. By just using a setter this creates statefulness that is not immediately clear or enforced. One possible solution for this problem is the library AssistedInject, which supports extra code generation through annotation processing to allow for automatically created factories which allow for dynamic object creation with compile-time safety.

A similar problem that can be solved by another part of the library is the ability to inject dependencies into custom views.

The second aspect was about the extra time it takes to build a project with Dagger in it due to the code generation/annotation processing. He recently started on a side project which offers an alternative version of Dagger which can be compiled for builds from the IDE. This version uses reflection to handle all the features of Dagger. This obviously has a runtime performance impact, but for development this impact is usually acceptable, especially if it reduces build time.

For release (and CI) builds the normal Dagger implementation would be used so there would be no difference for the end product.

It is currently being developed inside SDK Search, but when it is feature complete it might become its own library.

There were other interesting talks about Android Studio plugin development, Redux, MVI, Arrow Typeclasses, etc. They can all be watched on the site of Droidcon UK