hallo guys, have any of you used Android Architect...
# android
d
hallo guys, have any of you used Android Architecture Components? Would you advice to use it? What's the most commonly used architecture in Android nowadays?
So far I'm an MVP guy, but would like to try AAC
g
#android-architecture
👍 4
r
MVP a d MVVM
j
How do you handle config changes w/ MVP?
d
There's a lib for MVP you could try: https://github.com/grandcentrix/ThirtyInch/
🤔 2
m
folks, he's asking about the google libraries, not just patterns
d
He also asked:
What's the most commonly used architecture in Android nowadays?
m
"hallo guys, have any of you used Android Architecture Components? Would you advice to use it?"
@dave I would say Workmanager and lifecycle awareness are the better investments. While other things like Room have tons of valid alternatives and approaches, Workmanager's main competitors "are" Jobscheduler/FirebaseJobdispatcher, but turns out workmanager uses those two under the hood dependening on the scenario. Evernote's android-job does the same. Dealing with the lifecycle is one of the main tasks you'll have, so having a single way to do it across the app helps (again, we'd been doing it for years with no problem in several ways, but there isn't a "main" solution).
Regarding patterns, Google's Architecture components are oriented towards MVVM, although of course you can use them with your preferred pattern.
g
WorkManager is a good investment untill they introduce WorkWorker. I believe the next failed attempt will be called
WorkWorker
because
AsynkTask/JobScheduler/Loader
is already taken.
🤣 1
🙈 1
c
it is a serious ballache dealing with life cycle issues- turning on don't keep activities and disabling background processes just unleashes the pain
d
Some prefer MVP over MVVM, and I think that lib uses Lifecycle under the hood anyways... I personally want to look into MVVM, but MVP is a pretty simple pattern for less complex apps and it works well.
☝️ 2
j
To better answer question yes I have successfully used AAC LiveData, ViewModels in large prod apps. People have been equally successful w/ a wide variety of other patterns/libs also
👍 1
Your activity/fragment is a view binder. Don't use it for anything more such as retain state, business logic etc and 99% of your Android lifecycle issues and related issue such as memory leaks will go away
d
Hi guys, thanks a lot. I'm currently using MVP but I'm questioning it since AAC approach is sort of MVVM. I will dive into AAC, for now Navigation, ViewModel, LifeCycle. Let you know soon how it goes.
👍 1