简体   繁体   中英

Backoffice java client framework - load on deman

We are building our new Next generation server for a medium sized back office application. We already decided we would like to use a java framework for the client side (gwt \\ vaadin \\ zkoss)

What we would like now is to create a Proof Of Concept example of each technology.

our back office ui is pretty standard, we have tables \\ grids with filters that should show entries straight from the DB.

Problem is we got huge amount of rows in each table (1M minimum) which mean that we must use a load on demand tables for them.

My questions is: how do i implement a load on demand table for my big tables? I looked around and saw the following concept again and again:

you create a container, you populate it with data, the data is being displayed on the client side.

problem is i tried this naive way to populate the containers with 1M entries and it was awful. are there any built in on demand containers?>

any code examples \\ references will be a huge help!

You would want to use GWT Cell Table , which has the AsyncDataProvider , that lets you handle the user's paging and sorting events by grabbing data from your server.

It also provides an alternative ListDataProvider , which lets you grab your data as a list of objects, then set that data to your table. If you use ListDataProvider , you have to define how to sort your objects with Comparator s, and table will handle sorting and paging against that list.

Google "gwt celltable asyncdataprovider example" for more examples and tutorials.

Vaadin has a nice concept of lazy loading data in most of the components. For example the table, list, dropdown's etc. have that concept.

The only thing you realy need to know at start, is the number of total rows. Everything else can then be handled "ondemand".

For example the Table component initially only loads about 30 rows (can be customized) and then fetches rows as needed. (Or better they are usually fetched just before the user scrols to the next rows)

A example is this demo

http://demo.vaadin.com/dashboard/#!/transactions

How you retrieve the data from your backend depends on the technology used. But vaadin has working concepts where you don't need to load all 1mio. rows into memory, it will handle the "fetch on demand" as the rows need to be displayed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM