In a previous assignment, my manager suggested using the Translator template to convert data from a DataTable to objects. In principle, the Translator class had only static (i.e., class) methods, so it was an aggregation of function calls. My initial approach was to implement constructors for each object that can take a DataTable string as an argument and create an instance that matches the data.
He said that the Translator class was proposed by Microsoft and provided better code modularity. I see this point, but at the same time it seems to be a very non-OO approach (although the Visitor template has similar characteristics).
Have any of you used this template and what do you think of this? advantages and disadvantages?
source share