Class name: Transformer vs Transformation
Transformer
88%
Transformation
0%
Something else
12%
25 votes · Closed
Got a silly question:
Let's say I have an object ItemProvider
. It fetches and returns the initial record array.
Then I "wrap" it with "decorators" (decorator pattern) which transform, recalculate some properties of each item of the array.
This pattern is very convenient in my use case. I was wondering how would you call these decorators? Transformer or Transformation?
The classes have explicit name, but I want to put them under a namespace (e.g. Transformer\ValidationFilter
) and refer to them elsewhere using this name.
In math you apply a transformation to a given matrix. However, it would sound logical that a transformer applies the transformation. Also, Transformer sounds a bit silly :)
I think you guys know that naming things well is half the work :)
These are some of the decorators:
ProductArray\Transformer\PricePatcher
ProductArray\Transformer\ReferenceFilter
ProductArray\Transformer\ValidationFilter
ProductArray\Transformer\PriceCalculator