How to structure your controller, service and mapper method names
Aug 6, 2013
programming
This post is more than 18 months old. Since technology changes too rapidly, this content may be out of date (but
that's not always the case). Please remember to verify any technical or programming information with the current
release.
I was talking with one of the junior programmers on my team about naming method names. He was having problems coming up with ones that seemed to make sense to him and to the application. I broke it down how I think about it:
Controllers are people/user speak. Name those actions after something that a user would actually say.
Services are programmer speak. What is this programming actually going to do.
Mappers are data speak. What specifically is happening to the data when it goes in or comes out of this method.
I think this helped clear it up for him, what do you think?