"M" Coding Conventions
[This content is no longer valid. For the latest information on "M", "Quadrant", SQL Server Modeling Services, and the Repository, see the Model Citizen blog.]
The topics in this section describe coding conventions, idioms, patterns, and other best practices for modeling in the Microsoft code name “M” modeling language.
The guidelines are organized as simple recommendations that use the words “Do”, “Consider”, “Avoid”, and “Do not.” These words indicate the strength of the recommendation as shown in the following table.
Recommendation type | Description |
---|---|
“Do” |
A guideline that you should always follow. |
“Consider” |
A guideline that you should generally follow. Exceptions are acceptable when you understand the original guideline and have a reason not to follow it. |
“Avoid” |
A practice that you should generally avoid. There might be scenarios where the practice makes sense. |
“Do not” |
A practice that you should always avoid. |
Note
Note that even with the “Do” and “Do not” guidelines, there might be justifiable scenarios for breaking these rules. However, these scenarios are extremely rare, and you should carefully consider the consequences and possible alternatives.
In This Section
- Directory Structure
Provides recommendations for setting up directories in “M”.
- Source File Names
Provides naming conventions for “M” source files.
- Source File Content
Provides general guidelines for organizing the content of an “M” source file.
- Indentation and Line Width
Provides recommendations for indentations and line widths for “M” code.
- Braces
Provides recommendations for using braces in “M” code.
- Spacing and Alignment
Provides recommendations for spacing and alignment in “M” code.
- Comments
Provides recommendations for adding comments to “M” source files.
- Naming
Provides naming conventions for “M” code.
- Extents and Types
Provides best practices for using extents and types in “M” code.
Reference
Technical Reference ("M" Reference)