Restructure for Docsy theme

This commit is contained in:
Jeremy Vyska 2022-02-20 13:18:49 +01:00
parent f4a1ebc077
commit cceb0c945e
376 changed files with 963 additions and 186 deletions

View file

@ -1,9 +0,0 @@
+++
title = "Performance"
weight = 980
+++
## AL Coding Guidelines
## **Performance**
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..

View file

@ -1,11 +0,0 @@
+++
title = "Readability"
weight = 980
+++
## AL Coding Guidelines
## **Readability**
Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code.
Find the AL guidelines by expanding the menu in the left.

View file

@ -1,15 +0,0 @@
+++
chapter = true
pre = "<b><i class='fas fa-medal'></i> </b>"
title = "BC Dev. Best Practices"
weight = 15
+++
# Business Central Best Practices
## Coming soon!
This section will be cover things that aren't as simple as Design Patterns, but will help make sure your development is:
- high-performance
- complies with good designs
- has high maintainability

View file

@ -1,12 +0,0 @@
+++
chapter = true
pre = "<b><i class='fas fa-clone'></i> </b>"
title = "BC Patterns"
weight = 10
+++
# Business Central Design Patterns
## Coming soon!
This section will be all about the Design Patterns for BC and AL.

View file

@ -1,9 +0,0 @@
+++
chapter = true
title = "1. Patterns"
weight = 110
+++
## Browse design patterns by tags
_Originally, this page was categorized set of links to subpages, but that is not necessary now with the menu system to the left._

5
content/blog/_index.md Normal file
View file

@ -0,0 +1,5 @@
---
title: "AL Guidelines Blog"
linkTitle: "Blog"
type: "blog"
---

View file

@ -1,7 +1,8 @@
+++
title = "DeleteAll"
weight = 1180
+++
---
title: "DeleteAll"
tags: ["Performance"]
categories: ["Best Practice"]
---
<_Created by waldo, Described by waldo_\>

View file

@ -1,9 +1,10 @@
+++
title = "Subscriber Codeunits"
weight = 1180
+++
---
title: "Subscriber Codeunits"
tags: ["Performance"]
categories: ["Best Practice"]
---
<_Created by waldo, Described by waldo_\>
_Created by waldo, Described by waldo_
## Description

View file

@ -0,0 +1,21 @@
---
title: "Best Practices"
weight: 3
description: >
AL Code Best Practices
---
# Business Central Best Practices
This section will be cover things that aren't as simple as Design Patterns, but will help make sure your development is:
- high-performance
- complies with good designs
- has high maintainability
## Readability
Generally, all readability rules are Microsoft style choices only. You can use them to keep consistency with the existing code.
## Performance
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..

View file

@ -1,9 +1,10 @@
+++
title = "begin as an 'After Word'"
weight = 230
+++
---
title: "begin as an afterword"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Begin-End - Compound Only"
weight = 240
+++
---
title: "Begin-End - Compound Only"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
Only use begin..end to enclose [compound statements](https://docs.microsoft.com/en-us/cpp/c-language/compound-statement-c?view=msvc-170#:~:text=A%20compound%20statement%20%28also%20called%20a%20%22block%22%29%20typically,appear%20at%20the%20head%20of%20a%20compound%20statement.).

View file

@ -1,9 +1,10 @@
+++
title = "Binary Operator to Start Line"
weight = 250
+++
---
title: "Binary Operator to Start Line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "CASE Action on next line"
weight = 310
+++
---
title: "CASE Action on next line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Comment Spacing"
weight = 360
+++
---
title: "Comment Spacing"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Always start comments with // followed by one space character.

View file

@ -1,9 +1,10 @@
+++
title = "end else pair"
weight = 540
+++
---
title: "end else pair"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Keyword Pairs - Indentation"
weight = 730
+++
---
title: "Keyword Pairs - Indentation"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
The `if..then` pair, `while..do` pair, and `for..do` pair must appear on the same line or the same level of indentation. If possible, you can align the lines it is even much more readable.

View file

@ -1,8 +1,8 @@
+++
title = "Line Start Keywords"
weight = 740
+++
---
title: "Line Start Keywords"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Lonely Repeat"
weight = 760
+++
---
title: "Lonely Repeat"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
The `repeat` statement should always be alone on a line.

View file

@ -1,9 +1,10 @@
+++
title = "Named Invocations"
weight = 830
+++
---
title: "Named Invocations"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
When calling an object statically use the Object Name, not the Object Id.

View file

@ -1,9 +1,10 @@
+++
title = "One Statement Per Line"
weight = 910
+++
---
title: "One Statement per Line"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
A line of code should not have more than one statement.

View file

@ -1,9 +1,10 @@
+++
title = "Separate if and else"
weight = 1050
+++
---
title: "Seperate if and else"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
`if` and `else` statements should be on separate lines.

View file

@ -1,9 +1,10 @@
+++
title = "Spacing Binary Operators"
weight = 1120
+++
---
title: "Spacing Binary Operators"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
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 a space after the comma.

View file

@ -1,9 +1,10 @@
+++
title = "Suggested Abbreviations"
weight = 1170
+++
---
title: "Suggested Abbreviations"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description

View file

@ -1,9 +1,10 @@
+++
title = "Unnecessary 'else'"
weight = 1270
+++
---
title: "Unnecessary else"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
`else` should not be used when the last action in the `then` part is an `exit`, `break`, `skip`, `quit`, `error`.

View file

@ -1,9 +1,10 @@
+++
title = "Unnecessary true/false"
weight = 1300
+++
---
title: "Unnecessary true/false"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Do not use `true` or `false` keywords unnecessarily if the expression is already an logical expression.

View file

@ -1,9 +1,10 @@
+++
title = "Variable Naming"
weight = 1420
+++
---
title: "Variable Naming"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
Variables that refer to a AL object must contain the objects name, abbreviated where necessary.

View file

@ -1,9 +1,10 @@
+++
title = "Variables Declarations Order"
weight = 1430
+++
---
title: "Variables Declarations Order"
tags: ["Readability"]
categories: ["Best Practice"]
---
<_Created by Microsoft, Described by waldo_\>
_Created by Microsoft, Described by waldo_
## Description
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:

View file

Before

Width:  |  Height:  |  Size: 2 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Before After
Before After

View file

@ -1,12 +1,8 @@
+++
chapter = true
pre = "<b><i class='fas fa-save'></i> </b>"
title = "NAV Patterns Archive"
weight = 20
+++
# NAV Patterns Archive
## About the archive
This section of the site is a careful reproduction of the content of the Original Microsoft Community NAV Design Patterns project, created with permission.

Some files were not shown because too many files have changed in this diff Show more