Difference between revisions of "General.NamingConventions"

From emotive
Jump to navigation Jump to search
(Created page with "== Introductions == Following naming conventions apply to most of the names within a OTX project: * '''Root node''' ** No naming conventions * '''Package''' ** The naming co...")
 
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Introductions ==
+
{{DISPLAYTITLE:OTX Naming Conventions}}[[Category:General]]
Following naming conventions apply to most of the names within a OTX project:
 
  
* '''Root node'''
+
The following naming conventions apply to most of the names within an OTX solution:
 +
 
 +
* '''Root node (solution node)'''
 
** No naming conventions
 
** No naming conventions
 +
 +
* '''Project'''
 +
** The name of an OTX project will only contain letters, numbers, underscores and dashes, and the total length of the path to the project will be less than 128 characters (e.g. D:\Solution1\Project1\Project1.otfPrj < 128 characters).
  
 
* '''Package'''
 
* '''Package'''
** The naming convention follows the following regular expression: "'''(. \ [a-zA-Z] [a-zA-Z0-9] *) [a-zA-Z] [a-zA-Z0-9] * *'''"
+
** The naming convention is based on the following regular expression: " '''[a-zA-Z] [a-zA-Z0-9] *(\.[)"a-zA-Z] [a-zA-Z0-9]*)*"''' "
** Divided into one or more parts of alphanumeric characters separated by a period. Each part begins with a letter and corresponds to the name of the folder in the file system.
+
** It is divided into one or more parts of alphanumeric characters separated by a period ("'''.'''"). Each part begins with a letter followed with alphanumeric characters and corresponds to the name of the folder in the file system.
 
*** '''Right''':
 
*** '''Right''':
**** "Com.MyCompany.OtxSequences5"
+
**** "Packages.SubPackage1.SubSubPackage1"
**** "My5OtxSequences"
+
**** "My10Package"
 
*** '''Wrong''':
 
*** '''Wrong''':
**** "Com._MyCompany.OTX"
+
**** "Packages._SubPackage1.OTX"
 
**** "MesSéquencesTest"
 
**** "MesSéquencesTest"
**** "9thPackage"
+
**** "10thPackage"
 
**** ""
 
**** ""
  
 
* '''OtxName'''
 
* '''OtxName'''
** The naming convention follows the following regular expression: "'''_ * [a-zA-Z] [a-zA-Z0-9_] *'''"
+
** The naming convention is based on the following regular expression: " '''_ * [a-zA-Z] [a-zA-Z0-9_] *''' "
** Starts which are optionally one or more "_" prefixed with a letter. This is followed by alphanumeric characters including "_".
+
** It starts with a letter (optionally preceded by one or many underscore characters); all following characters are alphanumeric characters including underscores ("_").
 
*** '''Right''':
 
*** '''Right''':
**** "MyProcedure"
+
**** "MySignature"
**** "__validity10"
+
**** "__variable10"
**** "PI"
+
**** "COS"
**** "_y2"
+
**** "_p2"
 
*** '''Wrong''':
 
*** '''Wrong''':
**** "9x"
+
**** "8x"
 
**** "___"
 
**** "___"
 
**** ""
 
**** ""
  
 
* '''OtxLink'''
 
* '''OtxLink'''
** The naming convention follows the following regular expression: "'''(_ * [a-zA-Z] [a-zA-Z0-9_] * :) _ * [a-zA-Z] [a-zA-Z0-9_]? *'''"
+
** The naming convention follows the following regular expression: " '''(_ * [a-zA-Z] [a-zA-Z0-9_] * :) _ * [a-zA-Z] [a-zA-Z0-9_]? *''' "
** For internal references the naming convention corresponds to the OtxName
+
** For internal references the naming convention corresponds to the OtxName.
** If the referenced element is outside of the current document, a prefix followed by a colon is prepended. The prefix also corresponds to the OtxName (OtxName: OtxName)
+
** If the referenced element is outside of the current document, a prefix followed by a colon is prepended. The prefix also corresponds to the OtxName ('''OtxName:OtxName''').
 
*** '''Right''':
 
*** '''Right''':
**** "MyProcedure"
+
**** "MyDocument"
**** "X"
+
**** "Y"
**** "Sig: mySignature5"
+
**** "Doc1:mySignature10"
**** "Constants: PI"
+
**** "Constants:Omega"
  
 
* '''Keywords'''
 
* '''Keywords'''
*:To ensure the operational capability of OTX also no keywords of programming languages ​​should be used. The case will be respected in this regard. Below you will find a list of [http://msdn.microsoft.com/en-us/en-en/library/x53a06bb.aspx Keywords of C#]:
+
*:To ensure the executability of the OTX, no keywords of programming languages ​​will be used. The case will be respected in this regard. Below you will find a list of [http://msdn.microsoft.com/en-us/en-en/library/x53a06bb.aspx Keywords in C#]:
 
** {{FontColor|blue||abstract}}
 
** {{FontColor|blue||abstract}}
 
** {{FontColor|blue||as}}
 
** {{FontColor|blue||as}}
Line 121: Line 125:
  
 
== See also ==
 
== See also ==
[[OtxValidation|Validation (OTX-Checker)]] <br/>
+
[[Core.Validation|Validation (OTX-Checker)]] <br/>
​​[[OtxImports|Imports]] <br/>
+
​​[[Core.Imports|Imports]] <br/>
[[OtxDeclarations|Declarations]] <br/>
+
[[Core.Declarations|Declarations]] <br/>
[[OtxVisibilities|Visibilities]] <br/>
+
[[Core.Visibilities|Visibilities]] <br/>
[[OtxValidities|Validities]] <br/>
+
[[Core.Validities|Validities]] <br/>
[[OtxSignatures|Signatures]] <br/>
+
[[Core.Signatures|Signatures]] <br/>
[[OtxParameters|Parameter Declarations]] <br/>
+
[[Core.Parameters|Parameter Declarations]] <br/>
[[OtxProcedures|Procedures]] <br/>
+
[[Core.Procedures|Procedures]] <br/>
[[OtxComments|Comments]]
+
[[Core.Comments|Comments]]

Latest revision as of 10:28, 12 September 2019


The following naming conventions apply to most of the names within an OTX solution:

  • Root node (solution node)
    • No naming conventions
  • Project
    • The name of an OTX project will only contain letters, numbers, underscores and dashes, and the total length of the path to the project will be less than 128 characters (e.g. D:\Solution1\Project1\Project1.otfPrj < 128 characters).
  • Package
    • The naming convention is based on the following regular expression: " [a-zA-Z] [a-zA-Z0-9] *(\.[)"a-zA-Z] [a-zA-Z0-9]*)*" "
    • It is divided into one or more parts of alphanumeric characters separated by a period ("."). Each part begins with a letter followed with alphanumeric characters and corresponds to the name of the folder in the file system.
      • Right:
        • "Packages.SubPackage1.SubSubPackage1"
        • "My10Package"
      • Wrong:
        • "Packages._SubPackage1.OTX"
        • "MesSéquencesTest"
        • "10thPackage"
        • ""
  • OtxName
    • The naming convention is based on the following regular expression: " _ * [a-zA-Z] [a-zA-Z0-9_] * "
    • It starts with a letter (optionally preceded by one or many underscore characters); all following characters are alphanumeric characters including underscores ("_").
      • Right:
        • "MySignature"
        • "__variable10"
        • "COS"
        • "_p2"
      • Wrong:
        • "8x"
        • "___"
        • ""
  • OtxLink
    • The naming convention follows the following regular expression: " (_ * [a-zA-Z] [a-zA-Z0-9_] * :) _ * [a-zA-Z] [a-zA-Z0-9_]? * "
    • For internal references the naming convention corresponds to the OtxName.
    • If the referenced element is outside of the current document, a prefix followed by a colon is prepended. The prefix also corresponds to the OtxName (OtxName:OtxName).
      • Right:
        • "MyDocument"
        • "Y"
        • "Doc1:mySignature10"
        • "Constants:Omega"
  • Keywords
    To ensure the executability of the OTX, no keywords of programming languages ​​will be used. The case will be respected in this regard. Below you will find a list of Keywords in C#:
    • abstract
    • as
    • base
    • bool
    • break
    • byte
    • case
    • catch
    • char
    • checked
    • class
    • const
    • continue
    • decimal
    • default
    • delegate
    • do
    • stand-in
    • else
    • enum
    • event
    • explicit
    • external
    • false
    • finally
    • fixed
    • float
    • for
    • foreach
    • goto
    • if
    • implicit
    • in
    • int
    • interface
    • internal
    • is
    • lock
    • long
    • namespace
    • new
    • zero
    • object
    • operator
    • out
    • override
    • params
    • private
    • protected
    • public
    • read only
    • ref
    • return
    • sbyte
    • sealed
    • short
    • sizeof
    • stackalloc
    • static
    • string
    • struct
    • switch
    • this
    • throw
    • true
    • try
    • typeof
    • uint
    • ulong
    • unchecked
    • unsafe
    • ushort
    • using
    • virtual
    • void
    • volatile
    • while

See also

Validation (OTX-Checker)
​​Imports
Declarations
Visibilities
Validities
Signatures
Parameter Declarations
Procedures
Comments