samedi 4 février 2023

Should I define enums in the FrontEnd to avoid calling an API each time I need them

This is simply a design question, I'm developing a flutter app that has 8 enumerations in total (5 out of which are not supposed to change) So, I had the idea of defining these enumerations in the config of my flutter app instead of calling the getEnums API each time I need em (Or even call it once per app launch). And if the need arises to change an enumeration structure, it will simply have to be done in both the BackEnd and the Flutter app. I've been developing with Flutter for two months now so I wanted to see what experienced devs think of this suggestion before going forward with it. Thanks in advance!

The current behavior is calling the getEnums API when accessing a page needing these enums

Aucun commentaire:

Enregistrer un commentaire