Renderer Refactoring » History » Version 1
Philipp Gröbelbauer, 12.06.2024 10:43
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 | To achieve a more modern look and feel, QFQ Forms should support Bootstrap 5 in addition to the previously used Bootstrap 3. |
||
7 | However, implementing this functionality into the current codebase while still practicing "clean code" is not possible. |
||
8 | Therefore the current code is being refactored to support future expansion. |
||
9 | |||
10 | h2. Concept |
||
11 | Previously, preparation and rendering of the form with all its form elements was handled in AbstractBuildForm.php and BuildFormBootstrap.php. |
||
12 | The new concept introduces many new classes, making the code much more modular. |
||
13 | Most notably: *Separating Configuration and Rendering of Form and FormElements* ! |
||
14 | 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). |
||
15 | |||
16 | The class diagram below shows the full concept: |