# Service layer pattern

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Service_layer_pattern
> Markdown URL: https://mediated.wiki/source/Service_layer_pattern.md
> Source: https://en.wikipedia.org/wiki/Service_layer_pattern
> Source revision: 1335233622
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Layered architectural pattern

This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources. Find sources: "Service layer pattern" – news · newspapers · books · scholar · JSTOR (April 2010)

**Service layer** is an [architectural pattern](/source/Architectural_pattern), applied within the [service-orientation](/source/Service-orientation) [design paradigm](/source/Design_paradigm), which aims to organize the services, within a service inventory, into a set of logical layers. Services that are categorized into a particular layer share functionality. This helps to reduce the conceptual overhead related to managing the service inventory, as the services belonging to the same layer address a smaller set of activities.

## Rationale

Grouping services into functional layers reduces the impact of change. Most changes affect only the layer in which they're made, with few side-effects that impact other layers. This fundamentally simplifies service maintenance.

The [service reusability](/source/Service_Reusability_Principle) principle dictates that services should be designed to maximize reuse. Similarly, the [service composability](/source/Service_Composability_Principle) principle advocates designing services so that they can be composed in various ways. Both principles require that a service contain only a specific type of logic e.g., either reusable or process-specific logic.[1] Restricting each layer to a particular functionality, simplifies the design of the service.

## Usage

Diagram A
In the absence of any layers, services contain a mixture of different types of logic. This makes it difficult to manage these services.

Diagram B
A service inventory divided into layers where each layer contains the same type of logic.

Applying this pattern requires creating a service inventory blueprint, a list of services with associated functionality. Next, group the services into layers according to function. Adopting a common layering strategy across the enterprise facilitates reuse in other applications, because developers don't have as much to learn (or invent) when they join a project. One common layering uses task, [entity](/source/Entity_Abstraction_Pattern) and [utility](https://en.wikipedia.org/w/index.php?title=Utility_Abstraction_Pattern&action=edit&redlink=1).[2]

An alternative layering from Bieberstein et al.,[3] involves five layers, namely enterprise, process, service, component and object.

The service layer pattern invokes a specific [service architecture](/source/Service-oriented_architecture_types).

The [top-down](/source/Top-down_and_bottom-up_design) service delivery approach facilitates the use of this pattern.

## See also

- [Service layer](/source/Service_layer)

## References

1. **[^](#cite_ref-SOAMag_1-0)** [Thomas Erl](/source/Thomas_Erl).[Introducing SOA Design Pattern](http://soa.sys-con.com/node/645271?page=0,1) [Archived](https://web.archive.org/web/20100912055231/http://soa.sys-con.com/node/645271?page=0,1) 2010-09-12 at the [Wayback Machine](/source/Wayback_Machine) [Online]. Date accessed:6 April 2010.

1. **[^](#cite_ref-WK_2-0)** Wajid Khattak [Service Layers](http://www.informit.com/articles/article.aspx?p=1583177) [Online].Date accessed: 21 April 2010.

1. **[^](#cite_ref-3)** Bieberstein. et al.[Service-oriented Architecture Compass: Business Value, Planning, and Enterprise Roadmap](https://books.google.com/books?id=NISyExeJ5mAC&pg=PA88&dq=%22service+layer%22&lr=&hl=sv#PPA87,M1).FT Press, 2005. [ISBN](/source/ISBN_(identifier)) [0-13-187002-5](https://en.wikipedia.org/wiki/Special:BookSources/0-13-187002-5), [ISBN](/source/ISBN_(identifier)) [978-0-13-187002-4](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-187002-4)

- [Erl, Thomas](/source/Thomas_Erl) (2009). *SOA Design Patterns*. [Prentice Hall](/source/Prentice_Hall). [ISBN](/source/ISBN_(identifier)) [978-0-13-613516-6](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-613516-6).

- Mauro, Christian; et al. (2010). [*Service Oriented Device Integration - An Analysis of SOA Design Patterns*](https://doi.ieeecomputersociety.org/10.1109/HICSS.2010.336). HICSS 2010. *2010 43rd Hawaii International Conference on System Sciences*. pp. 1–10. [doi](/source/Doi_(identifier)):[10.1109/HICSS.2010.336](https://doi.org/10.1109%2FHICSS.2010.336). [ISBN](/source/ISBN_(identifier)) [978-1-4244-5509-6](https://en.wikipedia.org/wiki/Special:BookSources/978-1-4244-5509-6). [ISSN](/source/ISSN_(identifier)) [1530-1605](https://search.worldcat.org/issn/1530-1605). Retrieved 2020-07-26.

- Seshadri, Srikanth (17 January 2007). ["Logically SOA"](https://www.infoworld.com/article/2077670/logically-soa.html). *[JavaWorld](/source/JavaWorld)*. Retrieved 2020-07-26.

- ["Service-Oriented Architecture and Java - Service Layer"](http://www.binaryspectrum.com/service-oriented_architecture/soa_and_Java_2.html). Technology. Binary Spectrum. Retrieved 2020-07-26.

- Bieberstein, Norbert; Jones, Keith; Laird, Robert G.; Mitra, Tilak (17 July 2008). ["Executing SOA: A Methodology for Service Modeling and Design"](https://www.informit.com/articles/article.aspx?p=1194198). *[InformIT](/source/InformIT)*. Retrieved 2020-07-26.

- ["High-Level Perspective of the SOA RA"](https://collaboration.opengroup.org/projects/soa-book/pages.php?action=show&ggid=1334). *SOA Source Book*. [The Open Group](/source/The_Open_Group). Retrieved 2020-07-26.

## External links

- [SOA Design Patterns](https://web.archive.org/web/20201111163522/https://patterns.arcitura.com/soa-patterns)

---
Adapted from the Wikipedia article [Service layer pattern](https://en.wikipedia.org/wiki/Service_layer_pattern) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Service_layer_pattern?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
