Open AlbertoHdezCerezo opened 9 months ago
In our true framework you'll not write services but inherit from Parser
instead and therefore you have a parse
method - so the test is probably flavored a bit from our internal systems ;)
I do agree in services should just have a call
method as the ultimate destination, however I have given myself a habit many years ago of calling the method perform
instead inspired by ActiveJob
and kind of stuck with it as it has spread throughout my systems 🙈
By definition,
Service
classes perform only a specific action. The purpose of this action is usually reflected within the name class, and thus, many people use the convention of having a common interface for allService
classes consisting of acall
method.How about renaming
parse
tocall
? I feel the name of the method is already redundant (theService
class name already indicates it is a parser, and its interface consists of only aparse
method). This change could be a great convention for future services (so they all present the same public interface).Any thoughts?