[Difference] interview preparation Spring, SpringMVC, Struts2, MyBatis, Hibernate's

The differences between: Spring, SpringMVC, Struts2, MyBatis, Hibernate

Caused his interview preparation questions, add your own and integrate other people sharing!

1. The difference between the SpringMVC and Struts2

1 Struts2 is a class-level interceptors, SpringMVC is the method level interception.
2 SpringMVC entrance is servlet, and is the Struts2 filter
3 SpringMVC integrated Ajax, just a comment @ResponseBody can be achieved, while the Struts2 interceptor integrates Ajax, to be installed plug-ins or write your own code is integrated into it.
4 SpringMVC validation support JSR303, treatment is relatively more flexible and convenient, Struts2 validation more complicated.
Spring 5 SpringMVC and is seamless. Security than Struts2.
6 design thinking, Struts2 more in line with the OOP programming ideas, SpringMVC is more cautious, spread over servlet.
7 SpringMVC development efficiency and performance than Struts2.

2. MyBatis difference and Hibernate

1 MyBatis ORM framework is a semi-automatic, Hibernate is a fully automatic ORM framework.
2 MyBatis need to manually write SQL statements, and Hibernate does not.
3 MyBatis of poor portability, Hibernate good portability.

3. SSM difference and SSH

SSH usually refers to Struts2 to make the controller (controller), the component layers of management spring, hibernate responsible for the persistence layer.
SSM is the means to do SpringMVC controller (controller), the component layers of management Spring, MyBatis responsible for the persistence layer.
In common: 1.Spring dependency injection DI to manage components of each layer. 2. Using Aspect Oriented Programming AOP manage things, logs, and other privileges.
Different points: 1.Struts2 and SpringMVC controller (Controller) controlling the different mechanisms of interaction model and the view,
the Struts2 Action class is level, the level SpringMVC method, easier RESTFUL style.

Guess you like

Origin blog.csdn.net/weixin_43266090/article/details/89515233