Renderer Refactoring » History » Version 3
Philipp Gröbelbauer, 12.06.2024 11:24
1 | 1 | Philipp Gröbelbauer | h1. Renderer Refactoring |
---|---|---|---|
2 | |||
3 | Branch: https://git.math.uzh.ch/typo3/qfq/-/tree/F17252_Renderer_Refactoring |
||
4 | |||
5 | h2. Motivation |
||
6 | 2 | Philipp Gröbelbauer | |
7 | 1 | Philipp Gröbelbauer | To achieve a more modern look and feel, QFQ Forms should support Bootstrap 5 in addition to the previously used Bootstrap 3. |
8 | However, implementing this functionality into the current codebase while still practicing "clean code" is not possible. |
||
9 | Therefore the current code is being refactored to support future expansion. |
||
10 | |||
11 | h2. Concept |
||
12 | 2 | Philipp Gröbelbauer | |
13 | 1 | Philipp Gröbelbauer | Previously, preparation and rendering of the form with all its form elements was handled in AbstractBuildForm.php and BuildFormBootstrap.php. |
14 | The new concept introduces many new classes, making the code much more modular. |
||
15 | Most notably: *Separating Configuration and Rendering of Form and FormElements* ! |
||
16 | By doing this, new Renderer Classes can be implemented in the future, which use the same AbstractFormElement objects to render the element in a different way (e.g. Bootstrap 5). |
||
17 | |||
18 | The class diagram below shows the full concept: |
||
19 | 2 | Philipp Gröbelbauer | |
20 | 3 | Philipp Gröbelbauer | !renderer_class_diagram_update_2024.drawio.png! |