mercredi 5 septembre 2018

Is factory pattern is good for this situation?

Im developping for my company a software where clients can requests app deployements and upgrades.

Each request has 3 status (Validated, Started and closed).

For every type of request (deployment or upgrading) and for every status , each application has it own logic to execute.

enter image description here

I used the factory design pattern to handle this (picture below).

enter image description here

Is it the good or bad way ?

If a i add a new application in the database, i need to edit the code and add new ApplicationInterface , is it bad practice ?

Thanks

Aucun commentaire:

Enregistrer un commentaire