jeudi 17 juin 2021

python how to design a solution that is easy to scale to handle different types of commands?

I want to design a generic solution to handle different types of commands that is easy to scale i.e. If someone, later on want to handle a new type of command, he/she can easily write his handler, register it and good to go. Each command has an action parameter that defines what that command is and which one of the handler is candidate to handle it. We also do some validation before handing the command and some validation later on in handler- are specific to the command.

Please suggest your best thoughts/experience. Any UML/code examples/design patterns applicable would be more helpful.

Thanks.

Aucun commentaire:

Enregistrer un commentaire