The Biggest Flaw of Spring Web Applications

The developers who are using Spring Framework in their applications are good to talk about the benefits of dependency injection. Unfortunately, they are not so good to leverage its benefits such as the single responsible principle and separation of concerns in their applications. If we take a look at any Spring powered web application, the odds are that the application is implemented by using these common and equally erroneous design principles:

  1. The domain model objects are used only to store the data of the application. In other words, the domain model follows the anemic domain model anti-pattern.
  2. The business logic lies in the service layer which manages the data of the domain objects.
  3. The service layer has one service class per each entity of the application.

The question is: If this is so common, how can it be wrong? Let’s find out.

Old Habits Die Hard


Source : http://www.javacodegeeks.com/2013/06/the-biggest-flaw-of-spring-web-applications.html

Back to Top