Davide Giuseppe Farella
03/19/2023, 8:56 AMefemoney
03/19/2023, 9:15 AMStuffThatManagesViewState
and that’ll be fine too, the idea remains the same: Some business layer object mediating between your data layer (where your data is stored/ retrieved/ transformed etc) and the view layer (what the application user sees & interacts with) and is responsible for encoding whatever business rules your application hasDavide Giuseppe Farella
03/19/2023, 9:17 AMefemoney
03/19/2023, 9:17 AMStylianos Gakis
03/19/2023, 9:56 AMDavide Giuseppe Farella
03/19/2023, 10:07 AMStylianos Gakis
03/19/2023, 5:59 PMefemoney
03/19/2023, 6:35 PMStylianos Gakis
03/19/2023, 6:36 PMefemoney
03/19/2023, 6:37 PMDavide Giuseppe Farella
03/19/2023, 7:55 PMcollectAsLazyPagingItems
in the VM, being able to integrate paged data in my state and that's already an immense winchris-horner
03/19/2023, 10:48 PMI meant what are the benefits of using a Presenter, over keeping the logic in the ViewModel (updating the post)Hope the presentation was useful! My take on this - AAC ViewModel serves as an integration piece between your app’s logic and the OS. In the same way you wouldn’t want to put presentation logic in an Activity or Fragment, I wouldn’t want to put it in a ViewModel subclass either. You get better control over testing, and you aren’t forced to use a base class you don’t own. If you wanted to experiment with other approaches to integrating with Android / storing state, you could. ViewModel is just one way of doing it. All personal opinion of course! Do what’s right for your team and the problem at hand
Davide Giuseppe Farella
03/20/2023, 4:33 AMyou aren’t forced to use a base class you don’t ownThis is a very good point! You convinced me 🙂