As of January 2022 the TemplateDataBlob class is 1001 lines long. Buried in there are at least 4 different concept:
- The actual data
- Validation
- Normalization
- HTML formatting
- As well as some utility code
Some of the benefits of splitting these into separate smaller services:
- Code is much easier to read
- Things can be tested separately in smaller and faster unit tests
- Validation can be skipped when the input is known to be valid. This is currently not possible. Validation is done over and over again every time the API is used.
- https://gerrit.wikimedia.org/r/759442
- https://gerrit.wikimedia.org/r/759444
- https://gerrit.wikimedia.org/r/759477
- https://gerrit.wikimedia.org/r/749693
- https://gerrit.wikimedia.org/r/749698
- https://gerrit.wikimedia.org/r/751177
- https://gerrit.wikimedia.org/r/758861
- https://gerrit.wikimedia.org/r/758866
- https://gerrit.wikimedia.org/r/758867
- https://gerrit.wikimedia.org/r/759462
- https://gerrit.wikimedia.org/r/759454
https://gerrit.wikimedia.org/r/759455- https://gerrit.wikimedia.org/r/749695