multiple dataprovider usage
Hello,
In my project, which consists of multiple backend services, we have a separate NestJS project acting as our BFF (Backend for Frontend). Since each service behaves differently — such as returning different data structures or requiring different query parameters — we maintain separate data providers accordingly.
At this point, I have a question regarding the best approach to structuring these data providers: should we organize them based on services (i.e., per backend service), or should we structure them based on resources/pages on the UI? There are cases where a single page interacts with multiple backend services, which leads to challenges such as the need for manual cache invalidation.
So, my core question is:
When working with multiple data providers, is it better to create new providers per resource or per backend service?
Personally, I find service-based organizations more reasonable in terms of the maintainability and configurability of data providers. I would appreciate your insights on this matter.
In my project, which consists of multiple backend services, we have a separate NestJS project acting as our BFF (Backend for Frontend). Since each service behaves differently — such as returning different data structures or requiring different query parameters — we maintain separate data providers accordingly.
At this point, I have a question regarding the best approach to structuring these data providers: should we organize them based on services (i.e., per backend service), or should we structure them based on resources/pages on the UI? There are cases where a single page interacts with multiple backend services, which leads to challenges such as the need for manual cache invalidation.
So, my core question is:
When working with multiple data providers, is it better to create new providers per resource or per backend service?
Personally, I find service-based organizations more reasonable in terms of the maintainability and configurability of data providers. I would appreciate your insights on this matter.
