Modules and application layers
Edit on GitHubIn Spryker, we use modular programming and packaging principles for organizing functionalities into independent software packages—modules. To establish a common infrastructure across all modules and to assist configurability, flexibility, agility, and modularity, the modules are divided into application layers according to the Spryker OS application design concept. Each application layer is further divided into layers following the layered architecture pattern.
This document describes the Spryker layers and their roles in the application layers.
Layers
Layers are not limited to any specific application layer. In practice, though, there is a specific set of layers utilized by each application layer.
The Spryker layer structure looks as follows:
Each layer serves a single purpose inside an application layer.
Persistence layer
The Persistence layer is responsible for defining and dealing with the database in a module. Database table schemas and query objects are defined in this layer. The Persistence layer cannot access any other layer above it.
Business layer
All the business logic is implemented in the Business layer. It usually has several business models to serve the necessary functionality. The Business Layer is located directly above the Persistence layer, so it can access it for the read and write operations.
Communication layer
The Communication layer is the entry point of a module. When a frontend application communicates with the Commerce OS, it accesses the Communication layer first. Then, depending on the request functionality, the request is passed further from the Communication layer.
The Communication Layer is located above the Business layer, so it can access all the business logic in a module. That’s how the Communication layer invokes the right business logic when requested.
Presentation layer
On the Presentation layer, the view-related content is implemented. To get the needed data, the layer sends requests to the Communication layer. Then, it shows the data using the templates.
Next steps
- To learn about the building blocks of Spryker, see Programming concepts.
- To learn about application layers, see Concept overview.
- To learn about modular programming, see Modular programming.
- To learn about the layered architecture pattern, see Multitier architecture.
- To learn about packaging principles, see Packaging principles.
- To learn about quality attributes, see Quality attributes.
Thank you!
For submitting the form