You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scott Reeves edited this page Feb 22, 2021
·
4 revisions
Services are concerned with managing the flow of data to external resources, including database management. Their single responsibility is to 'hydrate' models and to push the data to storage or some other external system. An HTTP request is another possible destination that services would be required to handle.
Note, services are built to implement the I{Entity}Service interface and should be easily mocked during unit testing or swapped out completely for a different destination system. Services have the following conventions:
They are CLASSES that implement an interface
They are named {Entity}Service.cls
Services are used by Controllers to store and retrieve data to populate models.