KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Build Infinite Scroll of records with 4D Mobile
PRODUCT: 4D Mobile | VERSION: 16 | PLATFORM: Mac & Win
Published On: September 26, 2017

4D Mobile utilizes HTTP REST API of 4D Web Server to serve data to Web client. For optimistic reasons, 4D Mobile has set a default top size on the number of records transmitted in each HTTP REST call, the default value is 40. For example, if a collection returned by 4D Mobile has more than 40 records, it will contain the first 40 records in the first call to reference the collection on client side, the rest of records can be retrieved in a block of 40 records through subsequent REST calls. In this design, data is processed and transmitted when needed by web client. It eliminates unnecessary traffic and maximized the performance of 4D Mobile. This mechanism is implemented in nextPage(), previousePage() and more() methods of Angular-Wakanda framework . The lazy-loading concept of data introduces challenges to properly handle and display records in Web UI. The most common way to display list of lazy-loaded data is infinite scrolling. This tech note will introduce the concept and design of infinite scroll techniques in Web application; it will demonstrate best practices using Wakanda-Angular in Wakanda application, as well as jQuery and Ajax for generic web application.

Download Complete Tech Note: Tech Note Document