Service Layer
Noun · Development
Definitions
An architectural layer that sits between controllers (or API handlers) and the data access layer, encapsulating business logic, orchestrating transactions, and enforcing domain rules — keeping controllers thin and models persistence-focused.
In plain English: A middle layer in an application that holds the business rules, keeping them separate from the web request handling and database code.
Example: "Move the discount calculation out of the controller and into the service layer so both the API and the admin panel use the same logic."