Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 128 - ON FILL BUFFER  (Read 4277 times)
Reuben B.
Four Js
Posts: 1116


« on: June 20, 2022, 06:40:29 am »

One of the key characteristics of the Dynamic User Interface and the Front-End protocol is that only the visible rows of a a static or dynamic array rendered via List Dialogs (DISPLAY ARRAY / INPUT ARRAY)  to TABLE / TREE /  SCROLLGRID views are sent from the back-end to the front-end.  That is if an array has 1,000 rows but only 20 rows are visible, only 20 rows will be sent from the back-end to the front-end.  As the user scrolls down, then additional rows are sent from the back-end to the front-end.   No resources are wasted by sending rows from the back-end to the front-end that the user cannot see.
 
That same strategy can also be applied to fetching rows from the database into the array variable.  Why use resources to fetch rows from the database table if the user is not going to look at them?  This is achieved by use of the ON FILL BUFFER block and is known as Paged Mode of a DISPLAY ARRAY.   Using the same numbers as above, if only 20 rows are visible then only 20 rows will be fetched from the database into the array variable and then sent to the front-end.

Read more at https://4js.com/ask-reuben/ig-128/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines