I need some advice on structuring some code we are working on. Let me try to explain. We have a list of websites that can be of different types (or cms systems). We want to create a system that can perform remote tasks on those systems through ssh or api. The tasks are the same (add a user) but the execution is different by type.
How can we best create a structure that handles this? Task classes that do a switch on type, polymorph or something different?
Also, can we best add the types as constant to the website model of as a o2m relation to a type model?
I'm looking forward to your thoughts.