Open rubensdemelo opened 4 years ago
Hi @rubensdemelo,
Thanks for the inquiry.
Actually we are using repository layer. Let me explain.
If you look at the class FirestoreService, it contains all generic CRUD operation.
For example:
Creating/Updating a document: Future
For FirestoreDatabase, it is the actual Service layer representative that expose additional business logic, which uses Repository.
So, in future, lets say we added a new section and a new document for user to store images, I can create a separate collection and new methods in FirestoreDatabase without touching the FirestoreService.
Perhaps a better ways that we can improve the code, is to refactor the class name from FirestoreService to FirestoreRepository and make it as an Abstract class that contains basic CRUD method that any sub-class can access it. And then, the class FirestoreDatabase will extends the renamed FirestoreRepository to access the method.
Still, I would like to hear more from you and see area that can further improve (future roadmap). :)
Thank you for clarification. Appreciate.
Most welcome. :)
Side note, I have updated the project - now it support multi-language control, which is also commonly used and needed for any app. Please refer to the updated README.md.
Why not use repository layer to access firestore ?