November 14, 2016 / Reading time: 11m

#droidconUK 2016

android

conference

My thoughts on a two days of awesomeness event

As I sit outside the hotel just across the Business Design Centre, where 2016 droidconUK took place, I think about the last couple of days, how much I’ve learned and the awesome people I’ve me It was my first time in London but I’m pretty sure it won’t be my last (btw, how awesome is the city’ subway system?). Let me share my thoughts and experience about droidconUK.

Hello, green droid.

After a long line and a quick check-in process, I’ve finally entered the venue. The first round of presentations had already started, so I took the time to circle around and see the stands (get all the goodies!), Twitter, Amazon, Facebook and other not so recognizable but as interesting companies were represented. It was nice to meet/talk with all the different and interesting people who are developers like myself and are actively asking and really taking into account your feedback on their products. Besides, you get a sneak peak to an inside perspective on the engineering side (tech, team, office, processes, etc.).

People gathering inside the venue
Learning never exhausts the mind. — Leonardo da Vinci

While it’s always interesting to network, for this conference I was focused on the presentations, so many interesting subjects, presenters, and technologies, the hardest part were the multiple lanes, and deciding which one to go. Day 1 here we go 😎.

Designing the Design Support Library

by Chris Banes — Video

Chris (not so 🙄) briefly described the DayNight mode, which is basically an intelligent theme that applies different “visual flavors”, one darker and one standard, these modes can be toggled automatically with different settings/cases e.g. depending on the device’s current hour. This was initially used on the API 8 in the old car mode (not android auto).

Different DayNight modes

With Lollipop and the material theme, this DayNight (and others) mode implementation was dramatically improved. One of this important improvement is drawable tinting, instead of having to maintain each .png version of each screen size, with the new attributes and tags (e.g. primary color, secondary color, etc.) the framework is able to utilize these custom configurations to be propagated along the whole app. These improvements are bundled in the Appcompat library, enabling developers with custom drawable classes, dynamically tinting and referencing (custom) resources in themes, among other features.

Continuing, Chris focused on how the framework team had a lot of issues with transferring the fling velocity across nested (and other “out-of-scope” scenarios) views, which was solved with nested scrolling.

AppCompat — a mountain of hacks, we try to do the hacks so you don’t have to. — Chris Banes

In the end, when I asked around the general impression and mine, was the presentation was a little too technical, even for developers, but after I took the time and reflected on what I’ve learned also considering the fact that I find myself looking more and more into the actual android source code, this was actually VERY interesting, now with the knowledge of how it works, when the internal APIs are called, it’ll be a lot easier to solve nested-views-fling-scrolling-related-shenanigans problems.

A New View: Layout Editor + ConstraintLayout

by Huyen Tue Dao — Video

This was one of the most awesome presentation for me personally, I like Ux/UI but anything that helps me getting through the monotonous processes that come with building Android screens makes me super interested. Huyen talked how historically the UI Editors/Tools for building screens have always been bad (yes I know iOS is the exception), so us developers tend to rely on code to do stuff, even for building the user interface, I know I have, and still do.

Huyen on the “new” blueprint view

The new approach, as we know XML isn’t very expressive, when working on UI it’s easy to understand how visualisation helps, instead of having to create your own mental image of XML. Enter ConstraintLayout+UIEditor. The “new” CL is often called the “RelativeLayout on steroids”, for having better and (more) powerful conditions while being more performant (avoid AnySize) is awesome, our lives as developers are made easier with its constraints, It also helps to deal with all the different screen sizes present on the ecosystem so adaptiveness is another strong characteristic of the CL.

Android Testing Support Library: The Nitty Gritty

by Zan Markan — Video

Zan talked about the past and the present of Android testing (what a difference that is!). A little introduction of unit tests, some of the differences between JUnit3/4/Roboeletric then really focused on integration tests (UI), the currently Google-backed framework(s) espresso and ui automator. Firstly the setup, which dependencies to import, the particularities of the support library (tends to cause problems), and the tests modules/packages.

Further explaining some of the espresso APIs, how to get started if you never used it and getting into the more interesting stuff like espresso-contrib dependency which enables us to test against RecyclerView, Drawers, Pickers, etc. custom idling resources and other general tips.

Finally the UI Automator, a library that’s powering developers to do automated UI tests outside the app’s scope, awesome! In the end the Espresso Test Recorder, where you can record some actions and it will generate the test’s code, cool feature to get your test(ing) started.

Android Data Binding in action using MVVM pattern

by Fabio Collini — Video

Fabio started by giving a short introduction on the Android’s data binding library. Using a sample project as a base and showing code small snippets while explaining how the new “tags” on the XML work in conjunction with java. Further diving into the actual implementation.

Personally, I’ve used this library only for the binding part and it gets the job done. Once you start using the MVVM pattern in conjunction with the DBLibrary everything fits together. All of the sudden you have an observable pattern in your app without the need of interfaces since the library will have it’s internal callbacks, and quite easy to build your own custom binders.

After this introduction, Fabio explains how to use DataBinding with RxJava, which was a nice extra since the community is (not so) slowly shifting to this reactive pattern. I highly recommended this presentation if you are considering data binding on your own projects.

Really Important Things about the Business of Technology

by Chet Haase — Video

A nice, lightweight and funny review in the current corporate world and on how some companies loose their way when scaling, usually by overlooking their talents and, instead, hiring outsourcers. Mr. Chet has it when it comes to stand-up comedy!

Wrapping up day 1

It was a good first day. I’ve met new like-minded people and I’ve learned a lot. I was excited for day two but first, I had to take the rest of the day to go to the awesome droidconUK party at CodeNode, and finally visit the city.

London street — Nikon D800

Day 2 — What better way to kick it off than with one of the Google’s best, Chet Haase.

What’s New in Android

by Chet Haase — Video

Starting with a quick recap on the new Pixel phones, camera quality, and software, unlimited cloud storage etc., moving along to what’s new on Android 7.1 and how to implement some of the features like app shortcuts, round icons, transitions, Linkify, etc.

A brief explanation of the new components such as Bottom navigation, espresso test recorder and the layout editor (improvements) and finally the ConstraintLayout (like Huyen), sample code on the Android Studio has been improved, just like instant run and NDK support. Emulator improvements such as sensors and performance. New and improved APIs on Google Play Services. All now available on the stable channel.

Breaking Spotify’s release cycle by using the backend to drive the UI and feature releases

by Chris Doyle — Video

I was really interested in this talk since we do the same on Olx, having a UI 100% powered by the backend, and just like Spotify, we get a dynamic screen building, preventing unnecessary builds for trivial UI/structural changes.

Christ gave us a brief explanation of Spotify’s old release cycle, which was quite stressful for developers, and then showed Spotify’s internal tool for A/B testing. With a simple, if statement features can be toggled for users. This works especially well when aligned with the main presentation topic.

Having the backend feeding the screens structure with a sophisticated UI content framework that feeds JSONs to each client (Android, iOS, Web), each has its own implementation on how it should render the each element. In the image above we have the “component: card” where Android builds a “Card Component Model” that translates to what the user sees.

Data/Feature and UI changes aren’t dependent on the release cycle, so engineers are happy and consistency across platforms is easily archived due to the same backend powering this “UI map”.

Be together, not the same

by Anastasia López & Romain Piel — Video

Lightweight talk about the tech community in general, how to deal with people, learning to respect and celebrate diversity.

80% of any job is the ability to deal with people — Anastasia López

Most of the tackled social issues aren’t exclusive to the tech industry but on our society. Just like our beloved green robot says be together, not the same. Each and every one of us should be accepted as a human being regardless age, gender, sexual orientation, etc.. I won’t dwell too much since you better off watching the video (I highly recommend you to), remembering this issues and be do what you can to be more inclusive is the only way to evolve and (even slowly) solve them.

Keeping it Clean

by Rich King — No video, similar presentation here

This was quite an interesting talk, CLEAN architecture is currently a buzzword in the Android community, it seems to recently be a pattern more commonly adopted, as it should be. Some people may find this pattern a bit over-engineering. Unlike other patterns, clean architecture focuses on what your app does, not how it does it.

A good architecture emphasizes on the use-cases and decouples them from peripheral concerns — Robert C. Martin

Having a well structured app makes your life as a developer easier, of course, the bootstrap process is hard, you’ll have to deal with all the restrictions that come with this pattern. Another important aspect are dependencies, having the right code coupling with communication between different layers happening through interfaces and finally models.

Having the different models in the different layers when t makes sense helps abstract Business Logic, persistence and visualization layers. All these topics were thoughtfully presented and well explained.

This was a very complex and information rich, easily on my top-3 favorite presentations.

Animatable

by Nick Butcher — Video

This awesome presentation was heavily focused on material design & applying meaningful motion to make your apps more engaging and interesting for users. When correctly applied, motion carries users throughout different contexts. A smooth, beautiful and well-timed animation is enough to dazzle users, giving a sense of continuity.

Using Plaid (available on Github) as a base/sample project, Nick craftily explained how he went around some of the problems faced during the development of the app animations and transitions. Plaid is a motion-rich and a great base project to study if you want to learn more about this awesome and ever-evolving part of the Android OS. In similarity to Chet, Nick took the time and explain some code-snippets, having knowledge of the order the framework calls the APIs is always a powerful tool for your developer arsenal.

I think as a community we need to kinda share because we’re all very early in this kind of “art” (animations/transitions). — Nick Butcher

Also in similarity to Chris’s talk, the fling motion caused some issues due to the velocity transition.

Diving into some tricks and tips on how to scale text, and eventually animating without overlapping while positioning everything in smooth motion. I found this talk very eye-opening, if someone as proficient as Nick (this guy is a Design + Developer Advocate @ Google ffs) had so much work to do such a simple animation/transition, maybe we “simple” developers should give ourselves a break and actually take the time to create this sweet animations and transitions. Finally, Nick showed some cool animations on drawables.

Making Retrofit 2 Work For You

by Jake Wharton — Video

Ending this year’s droidconUK presentations was the Retrofit by Jake. The primary focus was to educate retrofit users (which was around 98% of the quorum) on some advanced features of this awesome library specifically configuring and customizing its behavior.

Firstly explaining how it’s possible to configure our HTTP client behavior, for instance, having a custom header that would give the client the info on how some request(s) need authentication.

This custom header wouldn’t actually (using Jake’s words) “go through the wire”, meaning this wouldn’t actually be sent to the server but would serve as a configurable field to our HTTP client, giving our decoupled custom behavior. This is an awesome trick to have everything on “our side” instead of using interceptors. Furthermore explaining how multiple factories give you more control on how you handle deserialization by having multiple converters (important note, the order you add your ConverterFactories matter). You can even take it a step further by creating your custom converter, this enables you to delegate some of the parsing responsibility internally e.g. encapsulate multiple converters with a fallback (like GSON).

As a practical example, most APIs give you some sort of meta-data that you won’t use, instead of creating an abstract model which then has a generic type where you pass your actual model, you can use a custom converter which takes care of this meta-data and then exposes only the actual model/list/interesting info that your application will actually use. Then Jake goes into an explanation on call-adapters and finally on testing/mocking.

I recommend you to see this talk if you want to take your to set-up your retrofit skills.


Android on the 40-year celebration of the punk-rock movement

I would like to thank OLX for giving me this opportunity. I had the luck to stay 4 days in London on a 2-day event. I used the free time to explore (even more) this awesome city. The weather was quite nice (for London) and that made the whole experience even more awesome.

See you in 2017 droidconUK, until then peace ✌️!

Share