Merge pull request #120 from TheDoubleH/TemplateChangesForDocsy
This commit is contained in:
commit
ea9d99f3bb
6 changed files with 71 additions and 57 deletions
|
|
@ -8,6 +8,7 @@ description: >
|
|||
# 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
|
||||
|
|
@ -18,4 +19,8 @@ Generally, all readability rules are Microsoft style choices only. You can use t
|
|||
|
||||
## Performance
|
||||
|
||||
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..
|
||||
Some guidelines are simply better for performance considerations rather than readability or anything else. In this section, let's look into some..
|
||||
|
||||
## Discussion
|
||||
|
||||
All discussion related to Best Practice are to be found on the Github Repo's Discussion pages, found [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ categories: ["Best Practice"]
|
|||
_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`.
|
||||
|
||||
## Bad code
|
||||
|
|
@ -22,6 +23,7 @@ _Created by Microsoft, Described by waldo_
|
|||
```
|
||||
|
||||
## Good code
|
||||
|
||||
```al
|
||||
procedure SomeProcedure()
|
||||
begin
|
||||
|
|
@ -31,9 +33,8 @@ _Created by Microsoft, Described by waldo_
|
|||
end;
|
||||
```
|
||||
|
||||
|
||||
## [Discussions](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices?discussions_q=unnecessary+else+category%3A%22BC+Best+Practices%22)
|
||||
|
||||
You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices).
|
||||
|
||||
If you don't find the discussion of this guideline, please feel free to create a new one with the same title as this article.
|
||||
If you don't find the discussion of this guideline, please feel free to create a new one with the same title as this article.
|
||||
|
|
|
|||
39
content/docs/Contributing/Templates/BestPractice/index.md
Normal file
39
content/docs/Contributing/Templates/BestPractice/index.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
title: "Title Here"
|
||||
tags: []
|
||||
categories: ["Best Practice"]
|
||||
---
|
||||
|
||||
<!-- This is a guideline, some parts are optional (if there's no content, remove the whole paragraph). -->
|
||||
<!-- The "Readability" and "Performance" tags are often used. You can, however, add multiple tags, but please do not change the Category -->
|
||||
|
||||
_Created by <!-- John Smith --><!--, Cronus International.--> Described by <!-- Jane Doe--><!--, Contoso, LLC-->_
|
||||
|
||||
## Description
|
||||
|
||||
In depth description on what this Pattern is all about
|
||||
|
||||
- basic components
|
||||
- how the interact
|
||||
- steps to implement
|
||||
- considerations to take
|
||||
|
||||
## Bad code
|
||||
|
||||
```al
|
||||
PutCodeblocksHere()
|
||||
```
|
||||
|
||||
## Good code
|
||||
|
||||
```al
|
||||
PutCodeblocksHere()
|
||||
```
|
||||
|
||||
## Discussions
|
||||
|
||||
Please discuss this guideline <!--[here](https://github.com/microsoft/alguidelines/discussions/42) Fix the link -->
|
||||
|
||||
You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices).
|
||||
|
||||
<!-- Create a discussions-page of your pattern, and add the sentence "You can discuss this pattern [here](https://github.com/microsoft/alguidelines/discussions/42)" with the right link to that discussions-page. -->
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
+++
|
||||
title = "Title of the Guideline"
|
||||
weight = 1180
|
||||
+++
|
||||
This is a guideline, some parts are optional (if there's no content, remove the whole paragraph).
|
||||
|
||||
<_Created by (company), Described by (company)_\>
|
||||
|
||||
## Description
|
||||
|
||||
In depth description on what this Pattern is all about
|
||||
- basic components
|
||||
- how the interact
|
||||
- steps to implement
|
||||
- considerations to take
|
||||
|
||||
|
||||
## Bad code
|
||||
|
||||
```al
|
||||
PutCodeblocksHere()
|
||||
```
|
||||
|
||||
## Good code
|
||||
|
||||
```al
|
||||
PutCodeblocksHere()
|
||||
```
|
||||
|
||||
## [Discussions](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices?discussions_q=TITLEOFYOURGUIDELINEGOESHERE+category%3A%22BC+Best+Practices%22)
|
||||
|
||||
<Please replace the "TITLEOFYOURGUIDELINEGOESHERE" in the link above, with the Title+of+the+Guideline (indeed, with "space" replaced by a "+") - and remove this line. \>
|
||||
|
||||
You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices).
|
||||
|
||||
If you don't find the discussion of this guideline, please feel free to create a new one with the same title as this article.
|
||||
|
|
@ -1,10 +1,12 @@
|
|||
+++
|
||||
title = "Title of the pattern"
|
||||
weight = 1180
|
||||
+++
|
||||
This is a guideline, some parts are optional (if there's no content, remove the whole paragraph).
|
||||
---
|
||||
title: "Pattern Name"
|
||||
tags: []
|
||||
categories: ["Pattern"]
|
||||
---
|
||||
|
||||
<_Created by (company), Described by (company)_\>
|
||||
<!-- This is a guideline, some parts are optional (if there's no content, remove the whole paragraph). -->
|
||||
|
||||
_Created by <!-- John Smith --><!--, Cronus International.--> Described by <!-- Jane Doe--><!--, Contoso, LLC-->_
|
||||
|
||||
## Abstract
|
||||
|
||||
|
|
@ -21,6 +23,7 @@ What happens before this pattern is used? How can it go wrong? 1-5 lines.
|
|||
## Description
|
||||
|
||||
In depth description on what this Pattern is all about
|
||||
|
||||
- basic components
|
||||
- how the interact
|
||||
- steps to implement
|
||||
|
|
@ -44,4 +47,8 @@ Youtube-link? BaseApp? Tweet? ...
|
|||
|
||||
## Discussions
|
||||
|
||||
Create a discussions-page of your pattern, and add the sentence "You can discuss this pattern [here](https://github.com/microsoft/alguidelines/discussions/42)" with the right link to that discussions-page.
|
||||
Please discuss this guideline <!--[here](https://github.com/microsoft/alguidelines/discussions/42) Fix the link -->
|
||||
|
||||
You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-patterns).
|
||||
|
||||
<!-- Create a discussions-page of your pattern, and add the sentence "You can discuss this pattern [here](https://github.com/microsoft/alguidelines/discussions/42)" with the right link to that discussions-page. -->
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
+++
|
||||
chapter = true
|
||||
pre = "<b><i class='fas fa-clone'></i> </b>"
|
||||
title = "Templates"
|
||||
weight = 100
|
||||
+++
|
||||
---
|
||||
title: "Templates"
|
||||
---
|
||||
|
||||
# Templates
|
||||
We have created some template-files that you can simply copy and use. Look at them as "Patterns for describing patterns"
|
||||
|
||||
We have foreseen some template-files that you can simply copy and use. Look at them as "Patterns for describing patterns" 😉.
|
||||
We currently offer the following templates:
|
||||
|
||||
We have foreseen a Template:
|
||||
- for [patterns](/contributing/templates/patterns/)
|
||||
- for [guidelines](/contributing/templates/guidelines/)
|
||||
- for [Patterns](/contributing/templates/patterns/) ([raw](https://raw.githubusercontent.com/microsoft/alguidelines/main/content/docs/Contributing/Templates/Patterns/index.md))
|
||||
- for [Best Practice](/contributing/templates/bestpractice/) ([raw](https://raw.githubusercontent.com/microsoft/alguidelines/main/content/docs/Contributing/Templates/BestPractice/index.md))
|
||||
|
||||
opening the "raw" link, will allow for the best copy/paste result.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue