We recently sat down with one of our Android developers, Daniel Llewellyn, to talk all things Kotlin, the future of Android development and how Flutter is changing the game for developers.
Read the Q&A below to get an insight into what goes on behind the scenes when we’re building apps for our clients in Kotlin and Flutter.
What does the Android Tech Stack look like at xDesign?
If we’re building in native Android, then we’ll use Kotlin. Kotlin runs in the same way as Java and gets compiled down into byte code, which is processed by the VM. There are Kotlin specific libraries and as time goes on, there are more and more of them. From Google’s point of view, Kotlin is the language of choice and is increasingly becoming the de facto language. Two of the things I love about Kotlin are its extensions functions, which allow us to add functionality to existing classes, and its data classes which give getters, setters and equality without any extra code.
On native Android we're learning from Flutter so that we can be ready for the production release of Jetpack Compose. We use Flutter for cross platform development and we're exploring architectures which are similar in Android for when we have a declarative UI available to us in Kotlin.
Why is there such a shift toward Flutter?
Flutter is excellent at building a great UI and in many ways it's nicer than doing it in Android native. We can see a lot of the changes for how the Android UIs of the future will be written to be a lot like the Flutter UI - they use a lot of the same terminology and it’s pretty straightforward to switch between the two.
Flutter’s evolution has also been really interesting. It was designed to work across Android and iOS but we’re now seeing a situation develop where we’ll have Flutter desktop and web apps so you’ll be able to write one UI and have it work across the different form factors: desktop, mobile and web.
What have you taken from other platforms when adopting Flutter?
Flutter is quickly becoming the predominant development platform for mobile at xDesign. We’re all big fans of the BLoC architecture and that’s got us looking at MVI for Android native because it's so similar to BLoC architecture.
Flutter has given us an opportunity to rethink project structure and we’re looking at bringing across storybooks to our Android development, which is usually used by the frontend web developers, where they build the components as separate tickets in Jira and then display them in a storyboard. now have something that sits between front end web development, where they group components
How do you handle device fragmentation in developing for Android?
So, device fragmentation is effectively what happens when you have hundreds of different devices running the same operating system. For example, with Android, you have tablets, flip phones, TVs, Chrome OS and all the different ways manufacturers handle their devices.
We support SDK23 upwards, which helps device fragmentation and there’s also been a transition over the past two or three years away from a system where packages we use for backwards compatibility where impossible to update independently and towards a system where those packages are more easily upgradable.
The other way that Google tries to help with that is through the Google Play Services. So the Play Store is part of Google Play Services and any Google registered phone pushes many of their updates and features through the Play Store so that’s how you get your updates, as opposed to the manufacturer doing it through the hardware.
What Innovations do you see ahead in Android development?
That’s definitely an open question. I prefer writing in Kotlin because it’s benefited from the years and years of development that Java has had. Intellij also provides a multi-platform service where you can compile Kotlin into native code so it will run on iOS, Windows, Mac and Java, so your Kotlin code will then run in a browser.
The other thing that’s coming down the line is Jetpack Compose, which will allow us to write our Android UIs a lot more like Flutter UIs but still retaining the benefits of being able to write in Flutter.