I'm trying to learn how to properly write my code and follow the MVC design pattern.
My scenario is the following: I'm paginating data from a database (firebase Firestore) and displaying that data into my tableview. Is the function that gets the paginated data from the database part of the controller? and do I store that data in a separate class that resides in the model?
Right now I'm paginating the data, and storing it in an array, all within the view controller but I know that's not the best way to do it.
Also, would it be beneficial to implement some database into my project to hold the paginated data? I'm very new to all this so any help is greatly appreciated!
Aucun commentaire:
Enregistrer un commentaire