Open Al12rs opened 1 year ago
An approach we can take here is, when we add a game that uses similar patterns to one we already support, refactor the code to be more generic and reusable. We don't want to end up with 50 mod installers when we could have 5.
If we can manage it I would like to try to design a solution that would avoid future refactors as much as possible from the get go.
If we can manage it I would like to try to design a solution that would avoid future refactors as much as possible from the get go.
I strongly agree with this. The less tech debt we generate as we go, the better.
A potential solution approach was defined here: https://github.com/Nexus-Mods/NexusMods.App/issues/489#issuecomment-1658215845
Epic
Currently there aren't many generalized solutions in place to avoid code duplication when adding new games. This is particularly evident for games that share many similarities (eg. bethesda games).
The goal would be to avoid code replication and make the addition of games with similar features as simplified as possible.
These systems would be optional (no forced interfaces for games that might not need them) and ideally be designed in such a way to not require modifications when support for a new game is added, so that all changes required for the addition of a game would be localized to new classes implemented for the game. (For example, a generic mod installer should not have a hardcoded list of games that it supports)
Some areas of overlap:
A generalized simple installer that accepts a list of valid folders and file extensions might make game support additions easier. (#504 )