In this session - we will discuss regarding the Architecture of spring boot and layes and flow of springboot.
what are the layers of spring boot?
Layers Of Spring Boot
Presentation Layer
Business Layer
Persistence Layer
Database Layer
PRESENTATION LAYER -
Performing authentication.
Converting JSON data into an object (and vice versa).
Handling HTTP requests.
Transfering authentication to the business layer.
The presentation layer is the equivalent of the Controller class.
The Controller class handles all the incoming REST API requests (GET, POST, PUT, DELETE, PATCH) from the Client.
BUSINESS LAYER -
Performing validation.
Performing authorization.
Handling the business logic and rules.
This layer is the equivalent to the Service class.
It's where we handle the business logic.
The Business layer communicates with both the Presentation layer and the Persistence Layer.
PERSISTENCE LAYER -
Containing storage logic.
Fetching objects and translating them into database rows (and vice versa)
This layer is the equivalent of the Repository interface. We write database queries inside this interface.
The Persistence layer is the only layer that communicates with the Business layer and the Database layer.
BUSINESS LAYER -
Performing validation.
Performing authorization.
Handling the business logic and rules.
This layer is the equivalent to the Service class.
It's where we handle the business logic.
The Business layer communicates with both the Presentation layer and the Persistence Layer.
DATABASE LAYER -
Performing database operations (mainly CRUD operations).
This layer is simply the actual database that you decide to use to build your application.
#Springboot #springbootinterview #springbootarchitecture