From 22bceb14842a63d98699b2f26e7cb481bb38ce22 Mon Sep 17 00:00:00 2001 From: Henrik Helgesen Date: Mon, 21 Feb 2022 22:57:39 -0800 Subject: [PATCH 1/2] Update Templates for Docsy and synced them up --- content/docs/BestPractices/_index.md | 7 +++- .../Templates/BestPractice/index.md | 39 +++++++++++++++++++ .../Templates/Guidelines/index.md | 36 ----------------- .../Contributing/Templates/Patterns/index.md | 21 ++++++---- 4 files changed, 59 insertions(+), 44 deletions(-) create mode 100644 content/docs/Contributing/Templates/BestPractice/index.md delete mode 100644 content/docs/Contributing/Templates/Guidelines/index.md diff --git a/content/docs/BestPractices/_index.md b/content/docs/BestPractices/_index.md index 174f7d91..698e2846 100644 --- a/content/docs/BestPractices/_index.md +++ b/content/docs/BestPractices/_index.md @@ -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.. \ No newline at end of file +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) diff --git a/content/docs/Contributing/Templates/BestPractice/index.md b/content/docs/Contributing/Templates/BestPractice/index.md new file mode 100644 index 00000000..dbb9e0d3 --- /dev/null +++ b/content/docs/Contributing/Templates/BestPractice/index.md @@ -0,0 +1,39 @@ +--- +title: "Title Here" +tags: [] +categories: ["Best Practice"] +--- + + + + +_Created by Described by _ + +## 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 + +You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-best-practices). + + \ No newline at end of file diff --git a/content/docs/Contributing/Templates/Guidelines/index.md b/content/docs/Contributing/Templates/Guidelines/index.md deleted file mode 100644 index da408a49..00000000 --- a/content/docs/Contributing/Templates/Guidelines/index.md +++ /dev/null @@ -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) - - - -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. \ No newline at end of file diff --git a/content/docs/Contributing/Templates/Patterns/index.md b/content/docs/Contributing/Templates/Patterns/index.md index f42c7dc1..031973e1 100644 --- a/content/docs/Contributing/Templates/Patterns/index.md +++ b/content/docs/Contributing/Templates/Patterns/index.md @@ -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)_\> + + +_Created by Described by _ ## 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. \ No newline at end of file +Please discuss this guideline + +You can find discussions on all "Best Practices" [here](https://github.com/microsoft/alguidelines/discussions/categories/bc-patterns). + + From eb783b94ff074295be3294b280f59dccffe02981 Mon Sep 17 00:00:00 2001 From: Henrik Helgesen Date: Mon, 21 Feb 2022 23:29:23 -0800 Subject: [PATCH 2/2] Cleanup and fix link --- .../BestPractices/unnecessary-else/index.md | 5 +++-- content/docs/Contributing/Templates/_index.md | 20 +++++++++---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/content/docs/BestPractices/unnecessary-else/index.md b/content/docs/BestPractices/unnecessary-else/index.md index a90c97a0..d190bfdf 100644 --- a/content/docs/BestPractices/unnecessary-else/index.md +++ b/content/docs/BestPractices/unnecessary-else/index.md @@ -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. diff --git a/content/docs/Contributing/Templates/_index.md b/content/docs/Contributing/Templates/_index.md index ca59e5a3..55b88a6e 100644 --- a/content/docs/Contributing/Templates/_index.md +++ b/content/docs/Contributing/Templates/_index.md @@ -1,14 +1,12 @@ -+++ -chapter = true -pre = " " -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/) \ No newline at end of file +- 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.