In this post, we will learn the difference between data providers available in Oracle VBCS.
A collection of data from the backend that can be bound to collection components such as listView and table in UI is to be stored by the data provider. In VBCS, we have two types of data providers, which are ArrayDataProvider and ServiceDataProvider. We will see the difference between these two.
- This is a static data provider which means it is a static source of data that does not change frequently
- This only allows infrequent adds, updates, and removes of the data
- In some cases, the UI component bound to this data provider needs to be refreshed after the data in its variable changes
- Operations on the data such as sorts, adds, removes or updates are managed by this data provider itself
Service Data Provider:
- This data provider represents the data that fetches from a service endpoint
- It allows externalizing fetches through an action chain
- Unlike ArrayDataProvider, this is a dynamic data provider that updates its variables and UI when the data changes through the delegated action chain
- Variable that uses this type also can be bound to collection components like listView, table, select and other components that accept the data provider.
- This has in-built support for operations like sorting, filtering, and paging of data collection