jeudi 17 septembre 2020

Strategy vs factory pattern in mapping example

I know this seems weird, but I have situation where both factory and strategy pattern seems like a option. I have some model on FE that I need to map with sort of complicated mapping logic to API format. So i wonder what pattern would be best fit, factory -> because i create objects to send to BE, or strategy -> because there is different operation based on model type?

Thanks!

Aucun commentaire:

Enregistrer un commentaire