Skip to content

Coding Styles

The SmartAceDesigns.ScriptoFormTemplates PowerShell module provides two separate coding style templates to use for creating a new ScriptoForm:
  • Allman
  • OTB
Each template is written in the specified coding style but is otherwise identical to each other in terms of functionality. You should select the template that matches your preferred coding style when building a new ScriptoForm Project with the New-SADScriptoFormProject function.
A coding style where opening braces are placed on a new line, aligning with the indentation level of the block they define. This approach improves readability by clearly separating control structures and their contents. If a coding style is not selected when deploying a new ScriptoForm Project this template will be used by default.
A coding style where opening braces remain on the same line as the control statement, while closing braces align with the indentation level of the block. This method minimizes vertical space usage while maintaining clarity. This style is more widely used in the PowerShell community and also matches what is used in other languages such as JavaScript.
To select the coding style template to use for your ScriptoForm Project, use the -CodingStyleTemplate parameter with the New-SADScriptoFormProject function. If not specified, the “Allman” style template will be used by default.
PowerShell
New-SADScriptoFormProject -Size Medium -DestinationPath D:\Demo -Name Show-DemoForm -CodingStyleTemplate OTB