Register now or log in to join your professional community.
The most important benefit is the Spring framework itself. Because of the Spring integration, applications can leverage all the features of spring framework. For example POJO style serve interfaces, IoC, Aspects, Remoting etc... Spring framework provides all these features out-of-box. And a good thing about Spring framework is that it's really easy to plug any custom component into the framework. With spring POJOs, IoC and Remoting it's very easy to develop services layer. Otherwise, we need to implement EJB Session Bean (stateful or stateless) or depend on the frameworks like JSF, Struts or Servlets to implement the business logic which is not ideal. All of these frameworks business logic from Presentation layer or tedious to develop and maintain (Struts, for example).
Spring provides template for managing sessions, transaction across the application. Without the hibernate template, applications need to manage these on their own.
With the Hibernate 3.0.1, Spring can manage the transactions and session management across the application without the template. Only thing you don't get without Hibernate template is Exception translation. But there are other options.
Springs developed in the USA and popularized in India, the point being the owner of this thread or say the question in itself shows a serious defect or understanding of what working in the enterprise itself means. The mantra from the Springs community is Springs handles the infrastructure part so you can focus on your application part. The answer to your question is what exactly are you trying to achieve? Working with EJB from3x offers the simplest form of code designs, you can ever imagine without any unnecessary overheads, I myself having worked with both Springs and EJB. When they say handling infrastructure, what infrastructure really? The truth is Springs in itself can very cumbersome with a lot of unnecessary divisions in the name of modules. Please read about working with EJB at the enterprise level and you will get all clarity you need. It is way easier after chosen the right application server to work with EJBs than working Springs which a provide a floating container added from the web tier. The EJB container is a built in container for every JEE compliant application server, the springs container is an add-on and not part of the Java EE JSR. The answer becomes from simple, built in versus add-on? Having a very good and thorough understanding of your java fundamentals, OOP principles and Design patterns, it is agreeable that working EJBs are so simplified with the right application server that you will no want to work with any other option. I have been there myself and you can see how quick the Springs people are quick to jump with answers, they have mostly written on Springs all their life. I have worked with both flavors and your answer will be in what you are trying ti achieve.
The Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications. Spring handles the infrastructure part so you can focus on your application part. Inside itself, Spring Framework codifies formalized design patterns as first-class objects that you can integrate into your own application(s) without worrying too much about how they work in backend.
Spring Framework mainly consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, Messaging, and Test, as shown in the following diagram.
The Spring Framework supports integration with Hibernate, Java Persistence API (JPA) and Java Data Objects (JDO) for resource management, data access object (DAO) implementations, and transaction strategies.
Originally, it was meant to be the replacement of EJB, and not the application/web server. Web server is still needed to run a web based application. Spring boot can be used as a framework to package and deploy existing spring applications without writing the configurations. It is is not a framework to develop applications. So, one would use spring boot for deploying one's spring mvc applications.
implementing spring+ hibernate in project is better than implementing project with jboss or glassfish. Because spring is light weight container compared to jboss or glassfish. So loose coupling can be provided and performance is more in spring+hibernate implementation.
SpringBoot is the way to go when you want to develop enterprise web applications using Java. SpringBoot has made the development of applications in Java smooth and has clean extensions to a lot of third party applications.
SpringBoot has embedded Hibernate support and the spring JPARepository makes it very easy to manage database queries and CRUD calls without writing any boilerplate code.
Once the application is developed on SpringBoot, it can be deployed on any application server of your choice.