Best Practices for QuickApps

As with any programming effort, there are many ways to accomplish a task, and a much smaller set of recommended ways to approach the solution. Here is a list of best practices related to the development of QuickApps.

Best Practices Reference

The following are QuickApp related best practices:

Keep scale in mind
  1. An operation that takes 1ms individually means that 1000 iterations of it will take an entire second.

  2. in particular: <set>, <merge> will result in many iterations that can add up to substantial time

UI Conditionals
  1. Running everything all the time is clear but inefficient

    1. use when_ to control execution.

  2. Only update things when absolutely necessary

    1. onsubmit_ as opposed to onchange_

    2. anything the user doesn’t interact with should not have <do onchange_>

  3. Be careful with <data>, <query>, <do tablevalue_>. These operations submit DBM transactions and run MDB ops.

Refactors
  1. Reduce a set of variables to one variable

  2. Redesign your set of variables so that they can update less often

  3. Overload highly related widgets / dynamic variables

    1. e.g. fiscal week and promo week