Spring is an open-source, light-weight and cross-platform application framework for easy application development as it takes care of infrastructure and developers need to concentrate on business logic whereas Hibernate is an entirely different framework for ORM (object-relational mapping) between Java classes and ...
Struts is an action-based presentation framework (but don't use it for a new development). Struts 2 is an action-based presentation framework, the version 2 of the above (created from a merge of WebWork with Struts). Hibernate is an object-relational mapping tool, a persistence framework.
Spring framework is more efficient than struts but sometimes spring framework provides complexity but in struts, everything is simple due to its easy and maintainable design. Spring framework has more functionality than struts. Spring MVC is mainly used because it is more secure and better performance.
So, to summarize:
I don't want to make things more confusing but note that Java EE 6 provides modern, standardized and very nice equivalent of the above frameworks: JSF 2.0 and Facelets for the presentation, JPA 2.0 for the persistence, Dependency Injection, etc. For a new development, this is IMO a serious option, Java EE 6 is a great stack.
Generally...
Hibernate is used for handling database operations. There is a rich set of database utility functionality, which reduces your number of lines of code. Especially you have to read @Annotation of hibernate. It is an ORM framework and persistence layer.
Spring provides a rich set of the Injection based working mechanism. Currently, Spring is well-known. You have to also read about Spring AOP. There is a bridge between Struts and Hibernate. Mainly Spring provides this kind of utility.
Struts2 provides action based programming. There are a rich set of Struts tags. Struts prove action based programming so you have to maintain all the relevant control of your view.
In Addition, Tapestry is a different framework for Java. In which you have to handle only .tml
(template file). You have to create two main files for any class. One is JAVA class and another one is its template. Both names are same. Tapestry automatically calls related classes.
You can see the overview and ranking for yourself here. Hibernate is an ORM, so you can use either struts+Hiberante or spring+hibernate to build a web app. Different web frameworks and many are alternatives to each other.
Spring is an application framework which deals with IOC (Inversion of Control).
Struts 2 is a web application MVC framework which deals with actions.
Hibernate is an ORM (Object-Relational Mapping) that deals with persistent data.
In short,
Struts is for Front-end development of website
Hibernate is for back-end development of website
Spring is for full stack development of website in which Spring MVC(Model-View-Controller) is for Front-end. ORM, JDBC for Data Access / Integration(backend). etc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With