Saturday, November 27, 2010

How I refactored my Service Class to be "Separation of Concerns" Compliant.

I'm developing this web application where a users actions is logged at certain places. I initially wrote the logging features into the Main Users Service. I'm currently looking at it now and will be refactoring out the functionality to separate concerns. While to me, at the time, logging a Users action is from a natural standpoint looked like it belonged to the Users service, a more thorough look at it made it clear that the Logging functionality should be it's own Service.
Don't see where the mix up of concerns is?
Here's a list of functionality my Users Service class

php model service class layer refactoring

No comments:

Post a Comment