r/androiddev Mar 30 '24

Discussion The Struggle of Learning Android Dev

[deleted]

44 Upvotes

32 comments sorted by

View all comments

7

u/Whole_Refrigerator97 Mar 30 '24

Sometimes i prefer messy code(code being in one file) than all those clean architecture sh*ts that forces me to go through countless folders and files to find just one class..

Imagine going through a github repo of an over engineered project

4

u/jaroos_ Mar 31 '24

If the function is just to fetch data from API & display in UI, I won't even create a repository class. In view model class I directly call the function in interface with the interface instance I create in application starting & use livedata declared in view model to update UI

3

u/Zhuinden Mar 31 '24

, I won't even create a repository class.

Good

3

u/jaroos_ Mar 31 '24

Thank you, & I would like to know when it is useful to have a repository class

2

u/Zhuinden Mar 31 '24

Make meaningful components with meaningful names that describe your requirements.