Four Js Development Tools Forum

General => Ask Reuben => Topic started by: Reuben B. on May 06, 2020, 08:37:23 am



Title: Ask Reuben 17 - When Should I Use ui.Interface.Refresh
Post by: Reuben B. on May 06, 2020, 08:37:23 am
The ui.Interface.refresh method is possibly one of the most misused pieces of Genero code.  A key point about the Genero architecture is that there are two components, the runtime or back-end, and the front-end, that communicate backwards and forwards across the network.  The runtime sends to the front-end any user interface changes but the runtime only does this when it is expecting a response back from the user.  The ui.interface.refresh method allows these changes to be sent when the runtime is not expecting a response back from the user.  This is necessary for cases such as messages and user interfaces that display the progress of a long running batch process.  However doing so increases the network traffic between the runtime and front-end, so its use will typically be controlled so that the screen is not updated faster than the end user can read it.

The article introduces the method, illustrates a few cases where it is ok to use, and a common case we see where it should not be used.

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