CloudCoders / Design-Patterns

Project for learning and discuss about design patterns
16 stars 1 forks source link

Added some try for Template pattern #45

Open Cotel opened 7 years ago

Cotel commented 7 years ago

Solve #44

We need to discuss if this is really a template because I am not convinced.

I doubt because in this case nothing should change in concrete templates, they just call their respective services. On the other hand, the original responsability of a controller is to handle the request, and the template delegates how this request must be solved into its concrete controllers.

I didn't write any test in case we don't follow this example. Also I don't know how to test this mini beast I coded in 20 minutes 😆