Hey I am new to Spring and coming from Android I w...
# spring
i
Hey I am new to Spring and coming from Android I wonder if Spring
Service
is equivalent of
UseCase
(Clean Architecture)?
a
A spring service is just a semantic alias for a DI artifact. So in essence it is just a “thing” (bean) that can be injected in other services.
i
Isn't it intended to hold buisness logic (Like the UseCase)?
a
Sure. But a Service isn’t a UseCase, so I’d suggest making another annotation that is called UseCase. Service is nothing more than just another name for Bean, so the same can be done with UseCase. UseCases and Services are different. A UseCase is specific to a use case (doh) and can call different services to achieve this. A service is a class that bundles behavior of a specific group. E.g a ShoppingCartService. So keep the naming different