The Data Layer

Entities, services and data providers: schemas, caching, and view binding.

The data layer gives you schema-validated entities, a caching service layer, and data providers that keep view state synchronized with the cache automatically.

The three classes

Class Role
Entity A typed, schema-validated data object with composite-key support
Service CRUD + custom operations against a remote API, with a client-side entity cache
DataProvider Per-view state manager that binds view state to service cache data

The flow is unidirectional:

View  ←(state)—  DataProvider  ←(entityChanged/cacheChanged)—  Service  →  remote API
     —(create/update/delete)—→ Service  —→ cache  —→ all bound DataProviders updated

Views never talk to the network. They render whatever their data provider (or plain state) gives them. Services cache every entity they see, so two views showing the same entity are always consistent — when one view saves a change, the other’s bound data updates automatically.

In This Section


Entities

Defining typed, schema-validated data objects with the Entity class.

Services

CRUD operations against a REST API with client-side caching, filtering and sorting.

DataProviders

Binding view state to service cache data — automatic synchronization without plumbing.