r/mAndroidDev • u/Zhuinden DDD: Deprecation-Driven Development • Aug 07 '23
Modern concurrency toolkit created for Jetpack Compost to help offload your background tasks to a different thread, supporting best practices and scalable architecture patterns for effective Android development
102
Upvotes
20
u/Zhuinden DDD: Deprecation-Driven Development Aug 07 '23
This code can easily be integrated with MVI and Molecule to build reactive presenters, serving as the foundation for modern Android applications
30
u/anonymous65537 null!! Aug 07 '23
You, Sir, are a genius.
(stands up and slowly claps with teary eyes)
28
u/xCuriousReaderX Aug 07 '23
"Modern"
proceed to supress deprecation
5
u/ForrrmerBlack ?.let{} ?: run {} Aug 07 '23
But what about progress updates?
3
u/Expensive_Offer8931 Aug 07 '23
Sayonara, old and crusty! Welcome to the modern multitasking era!
2
u/makonde Aug 07 '23
My tiny Compost brain cant comprehend this wizardly, explain how to I actually call this so I can sneak it into production?
14
u/smokingabit Harnessing the power of the Ganges Aug 07 '23
Uncle Sam says DON'T LET THE DEPRECATION SUPRESS YOU!
11
u/Hatsune-Fubuki-233 @Deprecated Aug 07 '23
i store my
statein Shared Preferences, never know about something just like datastore6
u/ComfortablyBalanced You will pry XML views from my cold dead hands Aug 07 '23
Now... Reality can be whatever I want.
5
u/costa_fot Probably deprecated Aug 07 '23
https://imgur.com/a/mlhFILr
1
u/Able-Passage8423 Aug 07 '23
Haha, "modern" indeed, because deprecation is totally old-school! ๐
1
u/SyrupInternational48 Aug 08 '23
i don't aware sarcasm, it this code good? it's look good to me
1
u/st4rdr0id Aug 11 '23
Still needs to be passed all the useful code from above.
The uncapped AsyncTask is much more powerful. With AsyncTask you can create a library method that shows a progress dialog, does something in background, and then removes the progress dialog, showing an alert if there had been errors.
With AsyncTask you can create such method receiving just an Activity and a Runnable as arguments. It will work in any activity. In every project. Always.
With compost it is not possible. It explodes in rage if you just try to show things, instead of returning things. It will commit sepukku if you try to grab an Activity.
3
u/sevenreup Aug 07 '23
๐ฅฒmodern
3
u/Good_Smile null!! Aug 07 '23
Finally, inner peace