You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The app as of now doesn't follow any specific software design pattern. Though i can see some controllers, the design is not followed by all the activities.
The basic idea is to separate the business logic from the UI. At present, the Activity seems to be handling everything from UI to data logic and business logic. Following a Design Pattern like MVP will make the code testable, readable as well as maintainable.
As far as UI is concerned, if we are able to separate the logic from the UI using these design patterns, we need not worry about changes in UI. The logic and data will remain intact irrespective of the UI.
There are three good options available: MVC, MVP and MVVM. Though, MVP or MVVM are generally followed for Android Development.
A good discussion on application of these patterns in Android can be found at various places on the web but this link is a good comparison of these three patterns: https://realm.io/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/ . There's also google samples available for MVP.
This thread is just meant for discussion on whether we should work in this direction now or later and also to zero down on to a design pattern which will be universally followed throughout the app.
The text was updated successfully, but these errors were encountered:
These are all good ideas and I think the app's architecture is starting to improve bit by bit (and moving towards the "cleaner" structure discussed here).
I'm closing this for the moment as there isn't tangible outcome that would let us close this in the future.
Problem description
The app as of now doesn't follow any specific software design pattern. Though i can see some controllers, the design is not followed by all the activities.
The basic idea is to separate the business logic from the UI. At present, the Activity seems to be handling everything from UI to data logic and business logic. Following a Design Pattern like MVP will make the code testable, readable as well as maintainable.
As far as UI is concerned, if we are able to separate the logic from the UI using these design patterns, we need not worry about changes in UI. The logic and data will remain intact irrespective of the UI.
There are three good options available: MVC, MVP and MVVM. Though, MVP or MVVM are generally followed for Android Development.
A good discussion on application of these patterns in Android can be found at various places on the web but this link is a good comparison of these three patterns: https://realm.io/news/eric-maxwell-mvc-mvp-and-mvvm-on-android/ . There's also google samples available for MVP.
This thread is just meant for discussion on whether we should work in this direction now or later and also to zero down on to a design pattern which will be universally followed throughout the app.
The text was updated successfully, but these errors were encountered: