diff --git a/Documentation/CodingGuideline.rst b/Documentation/CodingGuideline.rst new file mode 100644 index 0000000000000000000000000000000000000000..bd53088251af9704004b982fe19aeaab179bf7e7 --- /dev/null +++ b/Documentation/CodingGuideline.rst @@ -0,0 +1,77 @@ +.. ================================================== +.. ================================================== +.. ================================================== +.. Header hierarchy +.. == +.. -- +.. ^^ +.. "" +.. ;; +.. ,, +.. +.. --------------------------------------------used to the update the records specified ------ +.. Best Practice T3 reST: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/CheatSheet.html +.. Reference: https://docs.typo3.org/m/typo3/docs-how-to-document/master/en-us/WritingReST/Index.html +.. Italic *italic* +.. Bold **bold** +.. Code ``text`` +.. External Links: `Bootstrap `_ +.. Add Images: .. image:: ../Images/a4.jpg +.. +.. +.. Admonitions +.. .. note:: .. important:: .. tip:: .. warning:: +.. Color: (blue) (orange) (green) (red) +.. +.. Definition: +.. some text becomes strong (only one line) +.. description has to indented + +.. -*- coding: utf-8 -*- with BOM. + +.. include:: Includes.txt + + +.. _`CodingGuideline`: + +Coding Guideline +================ + +The following is not mandatory but shows some best practices: + +Constants +--------- + +* Define constants in ``Extensions > QFQ > Custom > ...`` + +* Dynamic values under ``Extensions > QFQ > Dynamic > ...`` + + +QFQ content record +------------------ + +* Name the record in the header field with: + + * Regular content: ``[QFQ] ...`` + * Content in the left column: ``[QFQ,L] ...`` + * Content in englisch: ``[QFQ,E] ...`` + +* The first lines should be comments, explaining what the record does and list all passed variables:: + + # + # Shows list of Persons living in {{country:SE}} + # + # {{country:SE}} + # + +* A good practice is to define all possible STORE_SIP Parameter in a SQL at the beginning and to copy the to STORE_RECORD:: + + 10 { + # Normalize variables + sql = SELECT '{{country:SE}}' AS _country + + # List selected persons + 20.sql = SELECT p.name FROM Person AS p WHERE p.country LIKE '{{country:R}}' + } + +* Always comment the queries like shown above. diff --git a/Documentation/index.rst b/Documentation/index.rst index 643d134ea60556cf128da19cefd93d05fa672348..bd96870dd9d6504d593d99f563526ee2a7b9e216 100644 --- a/Documentation/index.rst +++ b/Documentation/index.rst @@ -86,6 +86,7 @@ This documentation is for the TYPO3 extension **qfq**. System ApplicationTest GeneralTips + CodingGuideline Release License Sitemap