Jump to content

Default setting for "Restrictions on New and Delete" object DVR


Recommended Posts

I believe that the default value of the class Inheritance setting "Restrict references of this class type to member VIs of this class" (which is new to LV2009) should be FALSE. The default value is currently TRUE.

post-17-125063018022_thumb.png

I feel that the default value of TRUE adds an unnecessary constraint on users of value objects, which limits their ability to program applications.

Here is my argument:

There are two use cases for DVR's to LVOOP objects:

Use Case #1: DVR of a Value Object

A DVR of a value object (VO) is simply a DVR to a VO instance that is created by a user of the class in order to facilitate synchronous access to a VO from multiple locations of their application. In any case, a VO class designer does not care whether users of the VO create a DVR to facilitate memory management or parallel access to the VO and the the "Restrict references of this class type to member VIs of this class" setting should be set (and ideally default) to FALSE.

Use Case #2: Reference Object

A reference object (RO), by my own definition, is an instance of a class that was designed/intended to be used only in a by reference fashion. Such objects usually have setup and teardown (create/initialize and destroy/uninitialize) requirements that should be under the control of the class designer. In such cases, the "Restrict references of this class type to member VIs of this class" is very useful and should (IMO) be explicitly set to TRUE by the class designer. However, by assuming that all classes should have this value set to TRUE, it assumes that all classes are intended to be used by reference. This restricts use case #1 by default, even though it has no requirement on how the VO is created or destroyed.

Thanks for listening :)

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.