lundi 11 avril 2016

template Design pattern vs Factory Design pattern

I am working on a webapp. I am following template design pattern.

My webapp has a feature to add new Question(template) from n number of questions(templates).

Someone suggested me to use Factory design pattern for this purpose. HE told this will make adding new question types(templates) easier, increase code reuse. I am not able to get. Could someone please explain ? Is there some other design pattern/structure I can use here, that will help in adding new templates easier and increase code reuse?

Aucun commentaire:

Enregistrer un commentaire