Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Design Patterns - Service Layer

I am currently reading a lot about Design Patterns and I have been watching various Pluralsight videos from their library. Now so far I have learnt the following:

  1. Repository Pattern
  2. Unit of Work Pattern
  3. Abstract Factory Pattern
  4. Reading the awesome "DI in .NET" book

Now I read lot about Services and Service Layers and wanted some advice about the best place to read up and learn about these. I presume this fits into Domain Driven Design and I should start there? The term "Service" just seem to be used widely within IT and it can be confusing the exact meaning.

So my questions is:

  1. What is the Service Layer
  2. Where is the best place to learn about them
like image 253
garfbradaz Avatar asked Apr 09 '26 22:04

garfbradaz


1 Answers

The service layer is the layer which sits between the presentation layer and the data access layer.

The presentation deals with HTTP requests and responses (in a web app) and presentation logic in general (workflow between pages, etc.), and delegates to the service layer for the business, transactional logic that the application uses.

The service layer then delegates to a data access layer to access the database.

like image 57
JB Nizet Avatar answered Apr 20 '26 23:04

JB Nizet



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!