There are several articles and posts out there regarding what a Service Layer is. I’m going to throw my two cents in as to what my interpretation of the Service Layer is.
Whenever I am in conversations with other devs or giving presentations about the Service Layer, I convey the following points:
A Service Class is primarily “just another object”.
When I had first started reading up on this my mind was flooded with several definitions which are all true and “click” after you understand what the Service Layer actually does. Start off thinking of a Service Classes as a normal Class in your library.
A Service Layer is a collection of Service Classes.
A Service Layer consists of serveral Service Classes which can call upon one another. I’ll be discussing the strategies I use in a little more detail later in the series.
At this stage, we’ll start with the notion that a Service Object can call other service object to use it’s methods. Additoinally, it can provide access to other Service Object methods via proxy.