Server Rules

You can use server-side rules to improve the performance and user experience of SmartForms. Server-side means that rules are executed by the server before the form is sent to the browser on your device or computer, while Client-side means that the rules are executed by the browser on your device or computer. When a form or view uses client-side rules at runtime, conditions and actions are executed individually by the browser on your device or computer, potentially resulting in back-and-forth calls between the browser and the server for each action that needs to use the server. By using server-side rules where possible, you can execute the rule set once on the server before the view or form is sent to the browser. Because the rules are executed by the server rather than by the browser, server rules can help to improve the runtime performance and user's experience of the SmartForm.

Server-side rules are available when a view, form, subview, or subform loads (using the When the server loads… event), and are typically used to enable or disable controls, enable or disable the visibility of controls or views, collapse or expand a view, populate a control, open a worklist item, or change the appearance of a form based on certain conditions.

Use server-side rules to:

  • Avoid the flickering effect when controls and views are rendered by the browser. You can use server-side rules if you have views or forms with a lot of views and controls that must be populated, shown or hidden, data changed, cascading drop downs and more. When these actions are executed in the Initialize (client-side) rule, this results in flickering as the controls and visual layout is downloaded and displayed as a whole, then rendered in the browser. Moving the actions to a server-side rule avoids this flickering effect, because the view or form is prepared by the server and then sent to the browser.
  • Speed up data retrieval. Client-side rules can potentially perform many calls to the server to execute SmartObjects and retrieve data. In addition, when using separate server and web servers, latency between SmartForms and the application server can further slow down the overall rule execution and form loading. Server-side rules speed up the retrieval of data because rule execution happens on the server and the results are sent to the client, reducing the number of back-and-forth calls to the server.
  • Reduce the impact of SharePoint threading limitations. When you use SharePoint-based solutions, a limited number of threads are available to the server. If you use client-side rules, AJAX calls limit the amount of client-side threads of execution even further. Use server-side rules to reduce the impact of these SharePoint threading limitations, reduce view and form load times and improve the experience of using the form.