Why Layer needed?
- To abstract other layers
- You can focus on the constructing layer if abstractions being well
- Modulization allows you to using other layer like part of yours.
- To maintain vertical hierarchy between components easily
- Easy to check and test the System
Presentation Layer
- Layer which associated with UI and view
In Spring MVC Architecture, It means View + controller
Service Layer
Service Layer is application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each operation.
- Combine the domain model and decide the main feature
- Which task this application do?
- Generally complex task needs bundle of domains to be processed
- Role of Service Layer is combine those functions and provide it
- Core of API service
- But, placing main logic at Business layer is ideal. Service layer should svelte
Business layer (Domain Model)
- The place most Important, core logic is located