Difference between revisions of "Naming Conventions"

From mitk.org
Jump to navigation Jump to search
 
(Add link to style guide in the nigthly documentation)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
= Naming Conventions =
+
This page is about naming conventions of application and module source directories and build artifacts. For more naming conventions and MITK style guide, please have a look [http://docs.mitk.org/nightly/StyleGuideAndNotesPage.html here].
  
This page is about naming conventions of application and module source directories and build artifacts.
 
  
 
== Situation until 2013.12 ==
 
== Situation until 2013.12 ==
Line 8: Line 7:
 
Until MITK 2013.12 there was no official naming scheme, resulting in a mix of different styles.
 
Until MITK 2013.12 there was no official naming scheme, resulting in a mix of different styles.
  
==== Source tree ====
 
  
 +
=== Source tree ===
  
<pre><nowiki>
+
<syntaxhighlight lang="cpp">
 
Applications/
 
Applications/
 
   CoreApp
 
   CoreApp
Line 22: Line 21:
 
   QmitkExt
 
   QmitkExt
 
   QmlMitk
 
   QmlMitk
</nowiki></pre>
+
</syntaxhighlight>
  
  
==== Build artifacts ====
+
=== Build artifacts ===
  
 
Current build artifacts in MITK-build/bin:
 
Current build artifacts in MITK-build/bin:
  
 
+
<syntaxhighlight lang="cpp">
<pre><nowiki>
 
 
ImageExtractionTestDriver
 
ImageExtractionTestDriver
 
MitkTestDriver
 
MitkTestDriver
Line 46: Line 44:
 
libQmlMitk.so
 
libQmlMitk.so
 
...
 
...
</nowiki></pre>
+
</syntaxhighlight>
  
  
Line 55: Line 53:
 
# Qt dependent module directories and module names are prefixed with "Qt" or "Qml" (some modules will need to be renamed). They will then also additionally get the "Mitk" prefix.
 
# Qt dependent module directories and module names are prefixed with "Qt" or "Qml" (some modules will need to be renamed). They will then also additionally get the "Mitk" prefix.
  
==== New source tree layout ====
 
  
 +
=== New source tree layout ===
  
<pre><nowiki>
+
<syntaxhighlight lang="cpp">
 
Applications/
 
Applications/
 
   CoreApp
 
   CoreApp
   Workbench  <-- previously "mitkWorkbench"
+
   Workbench  &larr; previously "mitkWorkbench"
  
 
Modules/
 
Modules/
 
   CameraCalibration
 
   CameraCalibration
   AlgorithmsExt      <-- previously "MitkAlgorithmsExt"
+
   AlgorithmsExt      &larr; previously "MitkAlgorithmsExt"
   QtWidgets          <-- previously "Qmitk"
+
   QtWidgets          &larr; previously "Qmitk"
   QtWidgetsExt      <-- previously "QmitkExt"
+
   QtWidgetsExt      &larr; previously "QmitkExt"
   QmlWidgets        <-- previously "QmlMitk"
+
   QmlWidgets        &larr; previously "QmlMitk"
</nowiki></pre>
+
</syntaxhighlight>
  
  
==== New build artifact naming ====
+
=== New build artifact naming ===
  
 
New build artifacts in MITK-build/bin:
 
New build artifacts in MITK-build/bin:
  
 
+
<syntaxhighlight lang="cpp">
<pre><nowiki>
+
MitkImageExtractionTestDriver      &larr; previously "ImageExtractionTestDriver"
MitkImageExtractionTestDriver      <-- previously "ImageExtractionTestDriver"
 
 
MitkTestDriver
 
MitkTestDriver
MitkCameraCalibrationTestDriver    <-- previously "mitkCameraCalibrationTestDriver"
+
MitkCameraCalibrationTestDriver    &larr; previously "mitkCameraCalibrationTestDriver"
  
MitkWorkbench                      <-- previously "mitkWorkbench"
+
MitkWorkbench                      &larr; previously "mitkWorkbench"
MitkCoreApp                        <-- previously "CoreApp"
+
MitkCoreApp                        &larr; previously "CoreApp"
MitkIGTTutorialStep1              <-- previously "mitkIGTTutorialStep1"
+
MitkIGTTutorialStep1              &larr; previously "mitkIGTTutorialStep1"
MitkStep1                          <-- previously "Step1"
+
MitkStep1                          &larr; previously "Step1"
  
libMitkConnectomics.so            <-- previously "libConnectomics.so"
+
libMitkConnectomics.so            &larr; previously "libConnectomics.so"
 
libMitkAlgorithmsExt.so
 
libMitkAlgorithmsExt.so
libMitkCameraCalibration.so        <-- previously "libmitkCameraCalibration.so"
+
libMitkCameraCalibration.so        &larr; previously "libmitkCameraCalibration.so"
libMitkQtWidgets.so                <-- previously "libQmitk.so"
+
libMitkQtWidgets.so                &larr; previously "libQmitk.so"
libMitkQmlWidgets.so              <-- previously "libQmlMitk.so"
+
libMitkQmlWidgets.so              &larr; previously "libQmlMitk.so"
</nowiki></pre>
+
</syntaxhighlight>
 +
 
 +
 
 +
[[Category:Development]]

Latest revision as of 15:14, 9 June 2016

This page is about naming conventions of application and module source directories and build artifacts. For more naming conventions and MITK style guide, please have a look here.


Situation until 2013.12

Until MITK 2013.12 there was no official naming scheme, resulting in a mix of different styles.


Source tree

<syntaxhighlight lang="cpp"> Applications/

 CoreApp
 mitkWorkbench

Modules/

 CameraCalibration
 MitkAlgorithmsExt
 Qmitk
 QmitkExt
 QmlMitk

</syntaxhighlight>


Build artifacts

Current build artifacts in MITK-build/bin:

<syntaxhighlight lang="cpp"> ImageExtractionTestDriver MitkTestDriver mitkCameraCalibrationTestDriver

mitkWorkbench CoreApp mitkIGTTutorialStep1 Step1

libConnectomics.so libMitkAlgorithmsExt.so libmitkCameraCalibration.so libQmitk.so libQmlMitk.so ... </syntaxhighlight>


Change proposal

  1. No "mitk" string in source tree directories. There is no need to state that a module or appication belongs to "mitk", since it is already contained in the MITK source tree.
  2. All build artifacts and module names are prefixed with "Mitk" (the prefix will be configurable for external projects). Module names are visible from external projects and should carry a prefix identifying the project where the module is hosted. The same is true for build artifact names like shared library names.
  3. Qt dependent module directories and module names are prefixed with "Qt" or "Qml" (some modules will need to be renamed). They will then also additionally get the "Mitk" prefix.


New source tree layout

<syntaxhighlight lang="cpp"> Applications/

 CoreApp
 Workbench  ← previously "mitkWorkbench"

Modules/

 CameraCalibration
 AlgorithmsExt      ← previously "MitkAlgorithmsExt"
 QtWidgets          ← previously "Qmitk"
 QtWidgetsExt       ← previously "QmitkExt"
 QmlWidgets         ← previously "QmlMitk"

</syntaxhighlight>


New build artifact naming

New build artifacts in MITK-build/bin:

<syntaxhighlight lang="cpp"> MitkImageExtractionTestDriver ← previously "ImageExtractionTestDriver" MitkTestDriver MitkCameraCalibrationTestDriver ← previously "mitkCameraCalibrationTestDriver"

MitkWorkbench ← previously "mitkWorkbench" MitkCoreApp ← previously "CoreApp" MitkIGTTutorialStep1 ← previously "mitkIGTTutorialStep1" MitkStep1 ← previously "Step1"

libMitkConnectomics.so ← previously "libConnectomics.so" libMitkAlgorithmsExt.so libMitkCameraCalibration.so ← previously "libmitkCameraCalibration.so" libMitkQtWidgets.so ← previously "libQmitk.so" libMitkQmlWidgets.so ← previously "libQmlMitk.so" </syntaxhighlight>