====== 06 LVOOP ====== ===== General ===== * Make a class as private as possible - only expose the methods needed * Documentation: remove the ''.lvclass'' from the name in the Properties dialog * Use the "descendents must override" option in the Item settings of the class Properties dialog if methods have to be implemented in the child classes * Follow the traditional "passing through" of values (train of VIs) * Always create input //and// output terminal for the class ===== Naming ===== * If a class is only created for the purpose of serving as the parent for multiple child implementations, add the word ''abstract'' to the class name * Object Lifetime * instantiating an object: ''Create'' * destroying an object: ''Destroy'' * Accessors (Property nodes for setting or getting a single property of a class (*)) * "Get" (not "Read") * "Set" (not "Write") ===== Folder Structure ===== * Maintain accessors in virtual subfolders * VIs with special access scope (eg private) in a separate virtual subfolder * Add a /Private folder where needed * Add subfolders for added structure where needed ---- (*) Beware performance overhead in the microsecond range. See [[https://dokuwiki.hampel-soft.com/kb/ni-rt/performance]] ---- **[[https://createbettersoftware.com|The HSE Way of Working]]:** \\ A set of guidelines that recommend programming style, better practices, and methods for all our LabVIEW projects. We ask all our peers to follow these guidelines to help improve the readability of our shared source code and make software maintenance easier. |< 100% 50% >| |[[kb:bestpractices:codingconventions:performance|<< 05 Performance]] | [[kb:bestpractices:codingconventions:dqmh|11 DQMH >>]]|