Open-event-droidgen: Move code from views to ViewModels

Created on 12 Dec 2017  路  9Comments  路  Source: fossasia/open-event-droidgen

Actual Behaviour

Currently, all code in present in views that act as controllers

Expected Behaviour

Move code from activities and fragments to controllers

NOTE: Code in ViewModels should NOT depend on any Android classes like Context

Parent Issue : #2014

enhancement Android App

All 9 comments

Can you please point me in the direction from where to start solving this issue. I would like to work on this but i cannot understand the issue properly. Also please tell me in what directory do i have to make the changes.

The issue is for the whole app, but you can start with one activity/fragment at a time. You need to learn about architecture components of Android SDK - https://developer.android.com/topic/libraries/architecture/index.html

Specifically, the idea of the issue is to move to MVVM pattern from MVC using ViewModel

Ok thank you. I'll try solving this and disscuss here if i find any difficulty.

@iamareebjamal I am creating child issues for this parent issue for each activity/fragment. In this way the refactor can be done one activity/fragment at a time.
@Kartik2016 Then you can comment on those issues or create them for the activity/fragment you want to work on.

Yes that would be more convenient. Thanks.

@iamareebjamal I want to work on this issue 馃憤

@codesun Please create an issue for a relevant ViewModel like everyone above and start on it :smile:

@iamareebjamal can i make a ViewModel for CommentsDialogFragment

I don't think it has such complex functionality that it requires one

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PareshMayani picture PareshMayani  路  5Comments

gogeta95 picture gogeta95  路  7Comments

heysadboy picture heysadboy  路  3Comments

mahikaw picture mahikaw  路  7Comments

mariobehling picture mariobehling  路  8Comments