dimanche 28 décembre 2014

Builder Design Pattern on a search engine

I am new to design patterns or if I am already using them I did not notice it. I looked on design patterns and I am trying to apply the Builder design pattern on a search feature on a website, so that instead of a whole method with a bunch of if statements, I would like to create a more neater code using the Builder design pattern.


My problem is that the builder design pattern main goal is to avoid having a bunch of methods, therefore creating several parts of the search feature because without it I'll end up with 16 methods if I have 4 options in my search engine.


My question, how would you do it ?


Aucun commentaire:

Enregistrer un commentaire