start imporving docs

This commit is contained in:
Dennis Eichhorn 2020-11-15 21:11:05 +01:00
parent 15783051bf
commit 8c626d3cab
7 changed files with 311 additions and 13 deletions

268
general/app_flow.drawio.svg Normal file
View File

@ -0,0 +1,268 @@
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="391px" height="457px" viewBox="-0.5 -0.5 391 457" content="&lt;mxfile host=&quot;&quot; modified=&quot;2020-11-14T22:52:30.884Z&quot; agent=&quot;5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.46.1 Chrome/78.0.3904.130 Electron/7.3.1 Safari/537.36&quot; version=&quot;13.6.5&quot; etag=&quot;IFN7UMR82D_5cHEK2kDX&quot;&gt;&lt;diagram id=&quot;f52d839b-af3d-9e28-9e5e-6aed9f243001&quot; name=&quot;Page-1&quot;&gt;3VrbcpswEP0av2ZA4mI/5p6HZqaTtE36KIMCamVEQcR2v77CiIAsJbEbLNxmMh6xSGJ19hztymYCzxer6wLl6S2LMZ0AJ15N4MUEAH/mic/asG4MMPQbQ1KQuDG5neGe/MbS6EhrRWJcKh05Y5STXDVGLMtwxBUbKgq2VLs9Mao+NUcJ1gz3EaK69YHEPJVWN5h1N24wSVL56CkImhtzFP1MClZl8nkTAJ82f83tBWrnkgstUxSzZc8ELyfwvGCMN63F6hzTGtoWtmbc1St3X/wucMZ3GSDj9IxohVuPN37xdYsFjgU08pIVPGUJyxC97Kxnm/XiekZHXKV8QUXTFc0fmPO1jC6qOBOmboZPjOWyn+61XEjJqiKSfkjPOCoSLHtJUtUe9obJlV5jtsC8WIsOBaaIk2c1uEhyJHnp9zL0MyPCEeBIOntTGS3JZuDN1Ckan+SoDm3R6LnRmTYxMMcDaPH4WuJCjwmlQgo19suUcHyfow1KSyFGNQKvIvuMC45Xb6LWrj5QV++6cvXLThm+7JL2NNHaTDgrCL0Bh+tqeBwtP32dn+12NhxBdwXO13C74TwXljv8q8Il11BUMbLAKn+LVW3K6LEqNLAK+gOwCv47rGoppNAKjEWr1psecg94fprnR8cnUYNY4xOAQ9IHrwh/7LW/111ORAElLjPh2aMcsrlobvp7sK4UTOKndY0kDBFFZUmi1nxF6LshUchpyMlgtD0PTA8qawW4jGV4CzVnjyB0gTzxlVB+BHk4+LbwWjnkK1KDs93KIYEdWve65XWHUovwfgWT5x1ee+A97e2oqWETg4EBrjdaYtAL1wm8kv8goMLBs7moY4OkbomEQUkkPGDZ0SUOCOwlDlc/ft2xihsKftuo+MGWxp2pvXQa2NvHLYkVGKq44U+vOwOsV3EXpMwRj9JjpF4rUAvUg4f9PmTIEmI33hkOpRCOxTvvsOeuUYRtAng8YevH/lsWVxSLKsupZ6k/t5PxORPFDKP0CKXvuaE16Xv/X9aBBnJ6o5HTO8DxzIiNAcP9A2FE6e8QDy0BDA3qR3l+BLoOxtS1jsoF4miOSjw6LmHojIYLnNnb72yUOm1Zo2Ti6VibHdRLnW8EL0dnnJZhQ3unXagngC94kQvkx1fiNi6+Z/HQATRc7nCZs8ywQ1n94c/f4oqjYxIYMAkG+OHPC/Vc1rxk8HGiaAgYcNo9lR1OQOKyexGg+Wq0e9kCXv4B&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);">
<defs/>
<g>
<path d="M 35 50 L 35.03 70 L 35.03 55.03 L 35.03 68.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 35.03 73.88 L 31.53 66.88 L 35.03 68.63 L 38.53 66.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<ellipse cx="35" cy="25" rx="25" ry="25" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 48px; height: 1px; padding-top: 25px; margin-left: 11px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
User
</div>
</div>
</div>
</foreignObject>
<text x="35" y="29" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
User
</text>
</switch>
</g>
<path d="M 35.03 110 L 35.03 130 L 35.03 120 L 35.03 133.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 35.03 138.88 L 31.53 131.88 L 35.03 133.63 L 38.53 131.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="0" y="75" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 93px; margin-left: 1px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Http Request
</div>
</div>
</div>
</foreignObject>
<text x="35" y="96" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Http Request
</text>
</switch>
</g>
<path d="M 35.03 175 L 35.03 195.03 L 35.03 190 L 35.03 203.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 35.03 208.88 L 31.53 201.88 L 35.03 203.63 L 38.53 201.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="0" y="140" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 158px; margin-left: 1px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
WebApp
</div>
</div>
</div>
</foreignObject>
<text x="35" y="161" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
WebApp
</text>
</switch>
</g>
<path d="M 76.37 236.26 L 92.51 236.29 L 92.51 248.51 L 108.63 248.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 71.12 236.25 L 78.12 232.76 L 76.37 236.26 L 78.11 239.76 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 113.88 248.5 L 106.88 252.01 L 108.63 248.5 L 106.88 245.01 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 35.03 245 L 35.03 265.03 L 35.03 261.03 L 35.01 274.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 35 279.88 L 31.51 272.88 L 35.01 274.63 L 38.51 272.89 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 76.37 218.76 L 92.51 218.8 L 92.51 206.51 L 108.63 206.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 71.12 218.75 L 78.13 215.27 L 76.37 218.76 L 78.11 222.27 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 113.88 206.5 L 106.88 210.01 L 108.63 206.5 L 106.88 203.01 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="0" y="210" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 228px; margin-left: 1px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
???
<br/>
Application
</div>
</div>
</div>
</foreignObject>
<text x="35" y="231" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
???...
</text>
</switch>
</g>
<rect x="115" y="189" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 207px; margin-left: 116px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Router
</div>
</div>
</div>
</foreignObject>
<text x="150" y="210" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Router
</text>
</switch>
</g>
<path d="M 150 272.37 L 150 286 L 150 278 L 150 291.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 150 267.12 L 153.5 274.12 L 150 272.37 L 146.5 274.12 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 150 296.88 L 146.5 289.88 L 150 291.63 L 153.5 289.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="115" y="231" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 249px; margin-left: 116px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Dispatcher
</div>
</div>
</div>
</foreignObject>
<text x="150" y="252" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Dispatcher
</text>
</switch>
</g>
<path d="M 150 333 L 150 353.03 L 150 340 L 150 353.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 150 358.88 L 146.5 351.88 L 150 353.63 L 153.5 351.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 191.37 315.49 L 205.03 315.49 L 195.03 315.49 L 208.63 315.49" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 186.12 315.49 L 193.12 311.99 L 191.37 315.49 L 193.12 318.99 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 213.88 315.49 L 206.88 318.99 L 208.63 315.49 L 206.88 311.99 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="115" y="298" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 316px; margin-left: 116px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Modules /
<br/>
Controller
</div>
</div>
</div>
</foreignObject>
<text x="150" y="319" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Modules /...
</text>
</switch>
</g>
<path d="M 291.37 315.49 L 305.03 315.49 L 300 315.49 L 313.63 315.49" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 286.12 315.49 L 293.12 311.99 L 291.37 315.49 L 293.12 318.99 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 318.88 315.49 L 311.88 318.99 L 313.63 315.49 L 311.88 311.99 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 250 339.37 L 250 353.03 L 250 340 L 250 353.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 250 334.12 L 253.5 341.12 L 250 339.37 L 246.5 341.12 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<path d="M 250 358.88 L 246.5 351.88 L 250 353.63 L 253.5 351.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="215" y="298" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 316px; margin-left: 216px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Mapper
</div>
</div>
</div>
</foreignObject>
<text x="250" y="319" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Mapper
</text>
</switch>
</g>
<rect x="320" y="298" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 316px; margin-left: 321px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Database
</div>
</div>
</div>
</foreignObject>
<text x="355" y="319" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Database
</text>
</switch>
</g>
<path d="M 150 395 L 150 415.03 L 150 401.03 L 150 414.63" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="stroke"/>
<path d="M 150 419.88 L 146.5 412.88 L 150 414.63 L 153.5 412.88 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="all"/>
<rect x="115" y="360" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 378px; margin-left: 116px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
View
</div>
</div>
</div>
</foreignObject>
<text x="150" y="381" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
View
</text>
</switch>
</g>
<rect x="115" y="421" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 439px; margin-left: 116px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Template
</div>
</div>
</div>
</foreignObject>
<text x="150" y="442" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Template
</text>
</switch>
</g>
<ellipse cx="35" cy="311" rx="30" ry="30" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 311px; margin-left: 6px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Response
</div>
</div>
</div>
</foreignObject>
<text x="35" y="315" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Response
</text>
</switch>
</g>
<rect x="215" y="360" width="70" height="35" fill="#ffffff" stroke="#000000" pointer-events="all"/>
<g transform="translate(-0.5 -0.5)">
<switch>
<foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility">
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 68px; height: 1px; padding-top: 378px; margin-left: 216px;">
<div style="box-sizing: border-box; font-size: 0; text-align: center; ">
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: #000000; line-height: 1.2; pointer-events: all; white-space: normal; word-wrap: normal; ">
Model
</div>
</div>
</div>
</foreignObject>
<text x="250" y="381" fill="#000000" font-family="Helvetica" font-size="12px" text-anchor="middle">
Model
</text>
</switch>
</g>
</g>
<switch>
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
<a transform="translate(0,-5)" xlink:href="https://desk.draw.io/support/solutions/articles/16000042487" target="_blank">
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
Viewer does not support full SVG 1.1
</text>
</a>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

@ -4,7 +4,7 @@ The user request gets passed through the entire application to all modules. The
The routes usually reference endpoints in the module `controllers` which collects the model data through the model `mapper` and creates a partial response `view` with an assigned `template` and the collected model data.
![Application Flow](Developer-Guide/general/app_flow.svg)
![Application Flow](Developer-Guide/general/app_flow.drawio.svg)
In the following only the WebApplication and Application are mentioned as the other components are explained in detail in their respective documentation.
@ -31,6 +31,6 @@ Furthermore the Application also performs a `CSRF` check, defines the `CSP`, aut
## Database
A short extract of the database structure can be seen below. Please note that this only contains the very basic tables from a fresh install without very limited modules and even then we only included the key tables for simplicity reasons.
A short extract of the database structure can be seen below. Please note that this only contains the very basic tables from a fresh install with very few modules and even then we only included the key tables for simplicity reasons.
![Application Flow](Developer-Guide/general/base_uml.svg)
![Application Flow](Developer-Guide/general/base_uml.drawio.svg)

View File

@ -1,6 +1,30 @@
# Inspections
# Code Inspections & Tests
Code inspections are very important in order to maintain the same code quality throughout the application. The Build repository contains all esential configuration files for the respective inspection tools. Every provided module will be evaluated based on the predefined code and quality standards. Only modules that pass all code, quality and unit tests are accepted. This also applies to updates and bug fixes. Any change will have to be re-evaluated.
Code inspections are very important in order to maintain the same code quality throughout the application. The `Build` repository and package managers such as `composer` and `npm` contain all esential configuration files for the respective inspection tools. The framework and every module will be evaluated based on the defined code and quality standards. Only code that passes all code, quality and test standards are accepted. Updates and bug fixes also must follow the standards.
## How and what to test?
In this project multiple levels of tests must be implemented such as unit tests, integration tests and system tests.
The following testing requirements must be met:
* 90% code coverage in the tests
* all tests must pass without warnings, errors and exceptions
* no warnings and errors during static code inspections
* no usage of deprecated function calls
* no code style violations
* every test should have a short description for the test report
### Unit tests
Every test must be in it's own test function.
Every public function must have a unit test
### Integration tests
### System tests
## Test documentation
## Tools
@ -14,7 +38,7 @@ Tools used for the code inspection are:
These tools are all installed by running the `setup.sh` script from the Build repository.
## PHPUnit
### PHPUnit
This application uses PHPUnit as unit testing framework. Unit tests for specific classes need to be named in the same manner as the testing class.
@ -30,11 +54,11 @@ In order to also create a code coverage report run:
php vendor/bin/phpunit -c tests/PHPUnit/phpunit_default.xml
```
### Modules
#### Modules
Every module needs to have a `Admin` directory containing a class called `AdminTest.php` which is used for testing the installation, activation, deactivation, uninstall and remove of the module. Tests that install, update, remove etc. a module need to have a group called `admin`. After running the `AdminTest.php` test the final state of the module should be installed and active, only this way it's possible to further test the controller and models. A code coverage of at least 80% is mandatory for every module for integration.
## PHPStan
### PHPStan
With phpstan the code base is statically analyzed based on its configuration. This will help you to follow some of the "best" practices we enforce.
@ -42,11 +66,11 @@ With phpstan the code base is statically analyzed based on its configuration. Th
php vendor/bin/phpstan analyse --autoload-file=phpOMS/Autoloader.php -l 8 -c Build/Config/phpstan.neon --error-format=prettyJson ./ > Build/test/phpstan.json
```
## Jasmine
### Jasmine
The javascript testing is done with jasmine. The javascript testing directory is structured the same way as the `Framework`. Unit tests for specific classes need to be named in the same manner as the testing class.
## PHP CS
### PHP CS
Besides the code tests and static code analysis the code style is another very imporant inspection to ensure the code quality.
@ -54,7 +78,7 @@ Besides the code tests and static code analysis the code style is another very i
php vendor/bin/phpcs ./ --standard="Build/Config/phpcs.xml" -s --report-junit=Build/test/junit_phpcs.xml
```
## Git Hooks (Linux only)
### Git Hooks (Linux only)
The git hooks perform various checks and validations during the `commit` and warn the developer about invalid code or code style/guideline violations.

0
quality/release.md Normal file
View File

View File

@ -1,5 +1,13 @@
# Documentation
## User
## Developer
## Database
### Diagramms
## Php
The php documentation is based on PhpDocumentor, therefore only valid PhpDocumentor comments are valid for files, classes, functions/methods and (member) variables.