2

Generally,

MVVM or MVC or MVP , we are allocating classes under the package structure, as per architecture pattern role and responsible of each components.

Ex:

View - Design/user interaction related classes. ex: Activity/Fragments

Model - it helps to manage the data storage, which is coming fro Database or Networking side through repository/service API. ex: Pojo class/ Getter Setter class/ Data class in kotlin

ViewModel - it helps to hold all the business logic and bridge between view and repository. ex: Service API calling related classes.

we are creating classes based on the architecture pattern role.

remaining Constant, Utility, Adapter, DataBase classes - where can we keep it?

is there any rule to keep this classes any particular folder, based on google recommendation? Please share any android developer official link. ( i do not fine any official documentation, only samples are available)

or based on the developer convenient, we can keep these classes are separate folders.

Please suggest on this. Thanks Advance

harikrishnan
  • 1,985
  • 4
  • 32
  • 63

0 Answers0