hilla icon indicating copy to clipboard operation
hilla copied to clipboard

Accessing large data collections from the frontend (v1)

Open vlukashov opened this issue 6 years ago • 1 comments

When using a Vaadin Grid component in a TypeScript view I want to have an easy way of loading the data lazily so that users do not have to wait until the entire database is loaded into their browsers when they open that page.

In scope (v1)

  • An easy-to-use offset/limit-based Java backend API to expose pageable collections
  • An easy-to-use offset/limit-based JS frontend API to consume pageable collections
  • The backend is stateless (i.e. nothing is left in the server memory after a page request)
  • Support for sorting (possibly by several columns) in the Java / JS API
  • Support for filtering (possibly by several columns) in the Java / JS API
  • Support for counting items (with filters applied) in the Java / JS API
  • Counting items in the collection can be done in the same round trip with fetching a page
  • Support for sub-properties for sorting and filtering (e.g. customer.address.country)
  • Reasonable defaults (no exceptions) if the backend collection is modified between two page requests

Out of scope (v1):

  • The API browser gives a ‘nice’ view of methods returning a pageable collection
  • An easy-to-use cursor-based Java backend API to expose pageable collections
  • An easy-to-use cursor-based JS frontend API to consume pageable collections
  • Guarantees of consistency if the backend collection is modified between the two calls when using offset/limit-based pagination

vlukashov avatar Dec 20 '18 15:12 vlukashov

The backend API is (partially?) implemented with the Pageable support.

platosha avatar Mar 15 '22 12:03 platosha

A related list of common use cases for data-intensive UIs compiled by @Artur- : https://docs.google.com/document/d/1oN0wvp2tfQQiVWin9sN4j3dqSUegQr18meNqeppGx_A/edit?usp=sharing

tarekoraby avatar Jul 11 '23 17:07 tarekoraby