Synchronous and Asynchronous Programming

By David Gyenes, Senior Consultant

Definitions:
Synchronous- code is executed in sequence, each statement waits for the previous statement to finish before executing.
Asynchronous- code doesn’t have to wait, your program can continue to run. You do this to keep your site or app responsive, reducing waiting time for the user.
When you want to speed up a process in Ninox you can use “do as server” code. If you want to wait for the result (synchronous) then save the result in a variable then you can use the result in the following lines of code. Ex:
     let answer := do as server … end

If you don’t care about the when you receive the result (asynchronous) then you don’t have to store the result in of the “do as server” in a variable. Ex:

     Previous line of code;
     do as server
          …
     end;

     Next line of code

en_USEN