Greetings devs!
I wanted to share some thoughts I had lately in my mind and wanted to discuss this with other fellow Android developers. Sorry for the long post but I feel like a great discussion can come out of this, so please go ahead and read my post :)
I am a fresh out of uni person, who started working earlier this year. In my last year of uni, I got very interested in Android development, and naturally I started learning more about it mainly by official Google sources. This of course means that my first taste of Android was directly with the Jetpack libraries. The only way I learned how to do stuff was with the classic Google recommended way of all the classic stack (or buzz words) of:
Kotlin
Coroutines (or even RxJava)
ViewModels
Repository layers
"Dumb" View layer
Importance of process death
DI
ViewBinding (or DataBinding)
Room
ConstraintLayouts
Retrofit
LiveData (or really the concept of UI reacting to data changes)
The importance of Testability
No Singletons
Material Design
and more
Going into my first job, and only knowing about what I mentioned above, I was expecting that this is what Android development looks like and always looked like. Much to my surprise however, literally every single thing I mentioned above was *not* what I encountered. What I did encounter instead is:
Manual new Threads directly for any network call without any logic for canceling in case the calls are not needed anymore
Everything happening inside the fragments/activities (god classes)
No sense of viewmodel/repository layer or anything similar, just singleton classes that take care of different stuff that the fragments directly call getInstance() on
No handling of process death in any way
no sense of DI whatsoever (everything is a Singleton as discussed earlier)
normal findViewById everywhere (this is okay though, not such a big deal)
Realm with calls happening on the main thread (not always properly using managed/unmanaged objects)
Super nested RelativeLayouts/LinearLayouts etc.
Custom network stack manually embedding headers etc. on the requests sent instead of Retrofit
Global Event busses that handle every single network call with fragments manually registering/unregistering to callbacks from those global objects
No livedata as discussed since everything happens in the fragment and the views are directly mutated for all possible states
No tests whatsoever (and impossible to even write tests due to architecture set)
No proper usage of material design
And more I am probably missing
Now with all that said, I do understand that the "Google way" is not necessarily the absolute single source of truth and does not necessarily mean that this is the "correct" way to do things, but as someone new to the platform, it was the easiest way to get into this ecosystem so it is what it is. Needless to say that I have so far had a very hard time adapting to everything and I feel like I am super slow on doing even the basic stuff due to how much time is required to wrap my head around all the custom logic that is written for everything.
So for the discussion part, I have some questions in mind that I would like to hear opinions on.
Is this what most Android code bases feel like in the real world? Have I joined the Android environment in a just very "lucky" timing to have all the resources available to me to learn how to do stuff in some "recommended" way and I just missed the times when everything was custom and there were no standards? Were most of my efforts to get familiar with all these concepts not something that really applies to real life environments? Is the way forward trying to learn more "traditional" (if that's the correct term) Android development in order to feel more comfortable working in this field?
If this is not how things should be, how would someone like me achieve the absolute best way to improve myself despite all that was said above in order to still improve professionally so that I will still be employable by other companies that are following a more standard/modern approach to developing their apps.
I hope to hear some opinions on this topic, feel free to express yourselves however you like. I am open to the idea that I am wrong about this entire thing and that I should learn how to adapt to the current environment. But I would also be super happy to hear opinions on how to make the best out of a seemingly tough situation.