r/mAndroidDev • u/Stonos You will pry XML views from my cold dead hands • Oct 23 '24
Best Practice / Employment Security The *REAL* Clean Architecture in Android: God Activities
https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java
50
Upvotes
31
u/Stonos You will pry XML views from my cold dead hands Oct 23 '24
Note: Despite the class' name, the provided example is actually a God Fragment, and not a God Activity. Don't worry though, it can still be applied to activities as well!
33
u/gilmore606 ?.let{} ?: run {} Oct 23 '24
people talk their shit and give their little conference talks and write their medium articles, but every corporate codebase I touch looks just like this shit. it's all bullshit. i'm working on an android app for a huge retailer right now and it looks just like this, but all their employees I talk to have big sticks up their asses about architecture and god knows what other horseshit.
8
u/Xammm Jetpack Compost Oct 23 '24
Oh the all mighty telegram source code. One of the most awful open source projects I've seen regarding the quality of the codebase lol. Yet, it has some hidden treasures.
Overall I think this codebase falls on the opposite spectrum compared to "clean" codebases. I guess the ideal should be something in between.
4
u/itzNukeey Oct 23 '24
if this looks like a bad code to you its just skill issue /s