Java

Java is a set of computer software and specifications developed by Sun Microsystems, which was later acquired by the Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers.

Spring Logo

Spring Framework

The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.

Hibernate Logo

Hibernate Framework

Hibernate ORM is an object-relational mapping framework for the Java language. It provides a framework for mapping an object-oriented domain model to a relational database.

Showing posts with label Struts. Show all posts
Showing posts with label Struts. Show all posts

Sunday, February 2, 2014

Difference between Spring and Struts framework:

The major differences between Spring framework and Struts framework are :

Spring
Struts
Spring is an application framework in which Spring MVC is one of the modules of Spring framework.
Struts is a web framework which can be used to develop web applications.
Spring implements IOC Design Pattern.
Struts implement MVC Design Pattern.
It provides abstraction layer on multiple Java/J2EE technologies including Servlet, JSPs. Also provides abstraction on other framework software.
It provides abstraction layer only on Servlet, JSP technology.
Spring is a Layered Architecture.
Struts is a not a Layered Architecture.
Spring Framework is said to be a non-invasive means it doesn’t force a programmer to extend or implement their class from any predefined class or interface given by Spring API.
Struts is said to be invasive. In Struts we used to extend Action Class.
It forces the programmer that, the programmer class must extend from the base class provided by Struts API.
Spring provides easy integration with ORM, JDBC technologies.
In Struts, integrating with ORM,


JDBC technology, we need to do manually coding.
Gives built-in middleware services like transaction, logging, connection pooling etc.
Doesn’t give built-in middleware


services.
Spring is Lightweight framework.
Struts is Heavyweight framework.
Spring is loosely coupled.
Struts is tightly coupled.
It is not easy to integrate with other client side technologies.
It is easy to integrate with other  


client side technologies.
Spring MVC just provides tags for basic HTML form tags.
Struts 2 provides many out-of-box JSF styled complex and composite tags
Such as: Ajax DOJO tags
For View component, Spring allows JSP, Velocity, Freemarker, Excel and PDF
For View component Struts allows only JSP.
Spring MVC provides more handler mappings.
Struts doesn’t have specific handler
mappings but uses Action mappings.
Spring clear module division between Model, View and Controller.
Struts mixes Controller and Model.
Advantages of Spring Framework:


  • Transaction management
  • Support for Messaging
  • Support and Integration with Other Frameworks (Eg: Hibernate, Struts, Tapestry.. etc)
Advantages of Struts Framework:


  • Excellent support for Tag Library, which has wide industry acceptance.
  • Easy to integrate with other client side technologies.