papi-web-org / papi-web

Papi-web
7 stars 3 forks source link

Use composition over inheritance #7

Closed Amaras closed 1 year ago

Amaras commented 1 year ago

This PR is a change in architecture, using composition over straight inheritance from ConfigReader.

The comparison between the two design choices has been discussed for decades already, and Design Patterns: Elements of Reusable Object-Oriented Software (a book listing all design patters present at the time in OOP code) has recommended the use of composition over inheritance since 1994.

One secondary aim of this PR is to allow for the generelization of configuration formats (mainly TOML and YAML, maybe JSON, .properties, etc.) This would allow us to have a standardized format available to expert users, with its own documentation (if documented at all). This should be discussed in its own issue, though.

Amaras commented 1 year ago

This should not be expected to work this week in any case, as I can see bugs in what I wrote from looking at the diff here.

Amaras commented 1 year ago

From then on, I think this PR closes #4