Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Tomas Votruba:
Why is Collector Pattern so Awesome
Mar 12, 2018 @ 16:53:34

In a new post to his site Tomas Votruba shares some of his thoughts about why he thinks the Collector pattern is so awesome. The Collector pattern is one of many design patterns that can be used to create well-structured applications.

I already wrote about Collector pattern as one we can learn from Symfony or Laravel. But they're so useful and underused I have need to write a more about them.

Yesterday I worked on Rector and needed an entry point to add one or more Rectors by user.

He then goes through the process he followed during the refactor and some of the questions he asked:

  • Add a Provider?
  • Use Expression Language?
  • Does Collector Scale?
  • Add Tagging?

He finishes the post with one last thought about git history and how it should "tell the story" of the refactoring.

tagged: collector pattern refactor rector tutorial

Link: https://www.tomasvotruba.cz/blog/2018/03/08/why-is-collector-pattern-so-awesome/


Trending Topics: