We are implementing Spring MVC project with Hibernate functionality. As per the sample implementation of SpringMVC, we would have different layers with the application. They include: Controller, Service, Entity & Repository. Business logic of the application is being implemented in Service layer. API given by Spring framework follows the Object Oriented Principles, we are just wandering how SOLID principles can be applied to the classes of the application. In other words, how SOLID principles can be applied to the Spring MVC Hibernate application
Asked
Active
Viewed 1,117 times
1 Answers
1
The question is a bit abstract so here is a general answer:
I would suggest to look at the differences between rich and anemic models. Spring and Hibernate encourage using anemic model which is considered an anti pattern from Object Oriented Design point of view and makes it hard to apply SOLID principles.
More on this topic you can find in excellent book by Vaughn Vernon: https://www.amazon.com/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577
Domain Driven Design described in the book may be also of interest for you.

Andrey Koshelev
- 211
- 1
- 4
-
Thanks Andrey. I came across the Domain Driven Design and going through the book. – Pavan Kumar Galeveti Mar 18 '17 at 11:17