Merge pull request #127 from microsoft/waldo_tags
Added tags & categories + cleanup
This commit is contained in:
commit
d6a2ff9437
161 changed files with 295 additions and 34 deletions
|
|
@ -1,10 +1,10 @@
|
|||
---
|
||||
title: "DeleteAll"
|
||||
tags: ["Performance"]
|
||||
tags: ["AL","Performance"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
<_Created by waldo, Described by waldo_\>
|
||||
_Created by waldo, Described by waldo_
|
||||
|
||||
## Description
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Subscriber Codeunits"
|
||||
tags: ["Performance"]
|
||||
tags: ["AL","Performance"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "begin as an afterword"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Begin-End - Compound Only"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Binary Operator to Start Line"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "CASE Action on next line"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Comment Spacing"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "end else pair"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Keyword Pairs - Indentation"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
title: "Line Start Keywords"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
<_Created by Microsoft, Described by waldo_\>
|
||||
_Created by Microsoft, Described by waldo_
|
||||
|
||||
## Description
|
||||
The `end`, `if`, `repeat`, `for`, `while`, `else` and `case` statement should always start a line.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Lonely Repeat"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Named Invocations"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "One Statement per Line"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Seperate if and else"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Spacing Binary Operators"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Suggested Abbreviations"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Unnecessary else"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Unnecessary true/false"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Variable Naming"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Variables Declarations Order"
|
||||
tags: ["Readability"]
|
||||
tags: ["AL","Readability"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: "Title Here"
|
||||
tags: []
|
||||
tags: ["AL"]
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: "Pattern Name"
|
||||
tags: []
|
||||
categories: ["Pattern"]
|
||||
---
|
||||
+++
|
||||
title = "Pattern Name"
|
||||
tags = ["AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
|
||||
<!-- This is a guideline, some parts are optional (if there's no content, remove the whole paragraph). -->
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
chapter = true
|
||||
title = "2. Anti-Patterns"
|
||||
weight = 130
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
Some of the software development practices, had **not** stood the test of time. Despite that, some are still being used today by developers everywhere.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "Nav Upgrade"
|
||||
weight = 840
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
## Anti-Patterns in NAV Upgrade
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "Reusable Bugs"
|
||||
weight = 1020
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
_By Bogdana Botez, Andreas Moth, Eric Wauters (waldo), Elly Nkya, Nikola Kukrika_
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
chapter = true
|
||||
title = "3. CAL Coding Guidelines"
|
||||
weight = 150
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
We've decided to publish our current C/AL coding guidelines. They are actual, as per January 2015 when this is published (but might fall out of sync as time goes by).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Design"
|
||||
weight = 490
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "By Reference Parameters"
|
||||
weight = 280
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not declare parameters by reference if their values are not intended to be changed.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Class Coupling"
|
||||
weight = 320
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not write functions that have high class coupling. This makes the code hard to maintain.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Cyclomatic Complexity"
|
||||
weight = 460
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not write functions that have high cyclomatic complexity. This makes the code hard to maintain.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
+++
|
||||
title = "Encapsulate Local Functionality"
|
||||
weight = 530
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Any function used local must be defined as local.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "FINDSET FINDFIRST FINDLAST"
|
||||
weight = 600
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
FINDSET, FIND('+') or FIND('-') should only be used when NEXT is used and vice versa.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Initialized Variables"
|
||||
weight = 660
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Variables should always be set to a specific value, before they are used.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Maintainability Index"
|
||||
weight = 770
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
[Maintainability Index][anchor0]: Do not write functions that have a very low maintainability index. This makes the code hard to maintain.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Parameter Placeholders"
|
||||
weight = 920
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The number of parameters passed to a string must match the placeholders.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Static Object Invocation"
|
||||
weight = 1160
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Call objects statically whenever possible. It reduces extra noise and removes extra variables. Downside: changing the name of the object which is called statically will need a code update.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unreachable Code"
|
||||
weight = 1310
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not write code that will never be hit.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unused Initialized Variables"
|
||||
weight = 1320
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The value assigned to a variable must be used. Else the variable is not necessary.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unused Variables"
|
||||
weight = 1330
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not declare variables that are unused.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Variable Capacity Mismatch"
|
||||
weight = 1410
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not assign a value to a variable whose capacity is smaller.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "WITH Scope Name Collision"
|
||||
weight = 1450
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not use the WITH scope when it has a variable whose name is the same as a local variable. This can lead to wrong code assumptions.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Internally used DotNet Types"
|
||||
weight = 690
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
_(Dynamics NAV 2015)_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Internationalization"
|
||||
weight = 700
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Using Calcdate"
|
||||
weight = 1370
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
CALCDATE should only be used with DateFormula variables. Alternatively the string should be enclosed using the <> symbols.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Localizability"
|
||||
weight = 750
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "CaptionML on System Pages"
|
||||
weight = 300
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
CaptionML should always be specified on a page field for a system table. By default, system tables do not have captions, so if you need to use them in the UI then captions need to be added.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "FIELDCAPTION and TABLECAPTION"
|
||||
weight = 580
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
For user messages, errors etc., use FIELDCAPTION not FIELDNAME and TABLECAPTION not TABLENAME.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Global Text Constants"
|
||||
weight = 610
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Declare Text Constant as global variables.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Use Text Constants"
|
||||
weight = 1360
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Pass user messages using Text Constants. It makes translation easy.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Using OptionCaptionML"
|
||||
weight = 1380
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The OptionCaptionML should be filled in for sourceexpression using option data types.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Readability"
|
||||
weight = 980
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Begin as an 'After Word'"
|
||||
weight = 230
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
When BEGIN follows THEN, ELSE, DO, it should be on the same line, preceded by one space character.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Begin-End - Compound Only"
|
||||
weight = 240
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Only use BEGIN..END to enclose compound statements.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Binary Operator to Start Line"
|
||||
weight = 250
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not start a line with a binary operator.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Blank Lines"
|
||||
weight = 260
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not use blank lines at the beginning or end of any functions, after BEGIN, before END, or inside multiline expressions.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "CASE Action"
|
||||
weight = 310
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
A CASE action should start on a line after the possibility.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Colon usage in CASE"
|
||||
weight = 340
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The last possibility on a CASE statement must be immediately followed by a colon.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Comments inside Curly Brackets"
|
||||
weight = 350
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Never use curly bracket comments. During development, the "Block comment" functionality can be used instead. However, in production code, block comments are not recommended.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Comment Spacing"
|
||||
weight = 360
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Always start comments with // followed by one space character.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "END ELSE Pair"
|
||||
weight = 540
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The END ELSE pair should always appear on the same line.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Indentation"
|
||||
weight = 650
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
In general, use an indentation of two space characters. Logical expressions in the IF, WHILE, and UNTIL parts are indented at least 3, 6, and 6 spaces respectively.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Keyword Pairs - Indentation"
|
||||
weight = 730
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The IF..THEN pair, WHILE..DO pair, and FOR..DO pair must appear on the same line or the same level of indentation.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Line Start Keywords"
|
||||
weight = 740
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The END, IF, REPEAT, FOR, WHILE, ELSE and CASE statement should always start a line.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Lonely Repeat"
|
||||
weight = 760
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The REPEAT statement should always be alone on a line.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Named Invocations"
|
||||
weight = 830
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
When calling an object statically use the name, not the number
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Nested WITHs"
|
||||
weight = 850
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not nest WITHs that reference different types of objects.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "One Statement Per Line"
|
||||
weight = 910
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
A line of code should not have more than one statement.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Separate IF and ELSE"
|
||||
weight = 1050
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
IF and ELSE statements should be on separate lines.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Spacing Binary Operators"
|
||||
weight = 1120
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
There must be exactly one space character on each side of a binary operator such as = + - AND OR =. The parameter comma operator however, should have no spaces.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Spacing Brackets and ::"
|
||||
weight = 1130
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
There must be no spaces characters before and after [] dimension brackets symbols or :: option symbols.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Spacing Unary Operators"
|
||||
weight = 1140
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
There must be no space between a unary operator and its argument (except for the NOT keyword).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Suggested Abbreviations"
|
||||
weight = 1170
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
### Suggested Abbreviations
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Temporary Variable Naming"
|
||||
weight = 1200
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
The name of a temporary variable must be prefixed with the word Temp and not otherwise.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "TextConst Suffixes"
|
||||
weight = 1210
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
TextConst variable names should have a suffix (an approved three-letter suffix: Msg, Tok, Err, Qst, Lbl, Txt) describing usage.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unary Operator Line End"
|
||||
weight = 1250
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not end a line with unary operator.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unnecessary Compound Parenthesis"
|
||||
weight = 1260
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Use parenthesis only to enclose compound expressions inside compound expressions.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unnecessary ELSE"
|
||||
weight = 1270
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
ELSE should not be used when the last action in the THEN part is an EXIT, BREAK, SKIP, QUIT, ERROR.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unnecessary Function Parenthesis"
|
||||
weight = 1280
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not use parenthesis in a function call if the function does not have any parameters.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unnecessary Separators"
|
||||
weight = 1290
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
There should be no unnecessary separators.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Unnecessary TRUE/FALSE"
|
||||
weight = 1300
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not use TRUE or FALSE keywords unnecessarily if the expression is already an logical expression.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Variable Already Scoped"
|
||||
weight = 1400
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Do not use scope ''.'' qualifier unnecessarily when a variable is already implicitly or explicitly scoped. It keeps the code simpler.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Variable Naming"
|
||||
weight = 1420
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Variables that refer to a C/AL object must contain the objects name, abbreviated where necessary.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Variables Declarations Order"
|
||||
weight = 1430
|
||||
tags = ["C/AL","Readability"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Variables declarations should be ordered by type. In general, object and complex variable types are listed first followed by simple variables. The order should be the same as the object list in the object designer for C/AL objects. Afterwards come the complex variables like RecordRef, .NET, FieldRef etc. At the end come all the simple data types in no particular order.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "UX"
|
||||
weight = 1390
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
## C/AL Coding Guidelines
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Actions - Images"
|
||||
weight = 200
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
All actions must have an image assigned to them.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "CONFIRM"
|
||||
weight = 380
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Always end CONFIRM with a question mark.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "FIELDERROR"
|
||||
weight = 590
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Never use FIELDERROR with a period as it is automatically inserted.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "MESSAGE and ERROR"
|
||||
weight = 790
|
||||
tags = ["C/AL"]
|
||||
categories = ["Best Practice"]
|
||||
+++
|
||||
Always end MESSAGE or ERROR with a period.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
chapter = true
|
||||
title = "(OLD) Get Involved"
|
||||
weight = 170
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
|
||||
**Reminder, this is an ARCHIVE of the Patterns site, this information is not current.**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "Code of Conduct"
|
||||
weight = 330
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
Find below the rules to be used when disseminating or relating to the NAV Design Patterns.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "Patterns Authors"
|
||||
weight = 930
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
This is the list of people that have been part of the NAV Design Patterns team. If you would like to join the project follow the instructions provided on [Be a NAV Pattern Author][anchor0] page.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "Template for writing Nav Design Patterns"
|
||||
weight = 1180
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
This is a guideline, some parts are optional (if there's no content, remove the whole paragraph).
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
+++
|
||||
title = "NAV Patterns Archive"
|
||||
weight = 20
|
||||
tags = ["C/AL"]
|
||||
+++
|
||||
|
||||
## About the archive
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: "Patterns"
|
||||
title: "1. Patterns"
|
||||
weight: 110
|
||||
tags: ["NAV", "C/AL"]
|
||||
categories: ["Archived Pattern"]
|
||||
tags: ["C/AL"]
|
||||
categories: ["Pattern"]
|
||||
description: >
|
||||
Patterns described to be used with Microsoft Dynamics NAV
|
||||
---
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Activity Logs"
|
||||
weight = 210
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Originally by Ciprian Iordache at Microsoft Development Center Copenhagen_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Argument Table"
|
||||
weight = 220
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Originally By Nikola Kukrika and waldo_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Blocked Entity"
|
||||
weight = 270
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Originally by Abhishek Ghosh at Microsoft Development Center Copenhagen_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Data Driven Blocked Entity"
|
||||
weight = 470
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Written by Bogdan Andrei Sturzoiu, at Microsoft Development Center Copenhagen_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Cached Web Server Calls"
|
||||
weight = 290
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Originally by Mostafa Balat, Microsoft Development Center Copenhagen_
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
+++
|
||||
title = "Conditional Cascading Update"
|
||||
weight = 370
|
||||
tags = ["C/AL"]
|
||||
categories = ["Pattern"]
|
||||
+++
|
||||
_Originally by Jan Hoek at IDYN_
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue