I have a general question regarding usage of Firebase as my data base but I can't seem to find information to support one argument or another. For some context on my background, I am switching from electrical engineering over to software development so forgive me if I am not exactly following best practice design patterns.
My understanding is that if I have a back-end that could potentially change, I should implement a layer of separation between the app components and the database following MVVM principles. However, if I am using Firebase/Firestore, should I still be implementing an abstraction layer?
I currently have my application components (Fragment
and Activity
) call on a class with methods that then call upon another class where queries to Firestore are executed. However, because I need to wait for the data the be fetched from Firestore, I have to implement onCompleteListeners inside my Fragment
/Activity
and it's at this point that I feel shaky on my design.
Sorry for the long text, any guidance on the correct patterns and design philosophy is appreciated. Thank you.
Aucun commentaire:
Enregistrer un commentaire