当前位置:网站首页>Interviewer: what is the difference between SSH and SSM frameworks? How to choose??
Interviewer: what is the difference between SSH and SSM frameworks? How to choose??
2022-06-23 01:56:00 【Java technology stack】
source :blog.csdn.net/horero/article/details/54236833
I have used SSH Frame for a while , Finally, when optimizing the project, decide to use SSM frame , Here are some simple differences between the two frameworks .
SSH The frame is Struts+Spring+Hibernate and SSM It means Spring-MVC+Spring+MyBatis, Just from these two abbreviations, you can see , If we compare the differences between the two, we mainly compare Struct and Spring-MVC as well as Hibernate and MyBatis.
SpringMVC contrast Struts
- Struts and Spring-MVC Are responsible for receiving and forwarding , But both are aimed at request Your request is very different ,Struts It's about a Action Class to make the request , That is, a Action Corresponds to a request class , So class interception , The requested data class is shared . and Spring-MVC For method level requests , That is, a method corresponds to a request , It belongs to method interception , The requested data method is not shared .
- Spring-MVC There are relatively few configuration files , Easy to use , It can accelerate the speed of software development , Experience effectively .
- Spring-MVC The entrance to is Servlet Level and Struts The level of is Filter Grade .
Hibernate contrast MyBatis
in the light of Hibernate and MyBatis Operate on persistent classes , The differences between them can be sorted out as follows :
- Hibernate It's a kind of O/R Relational type , That is to complete the mapping between database tables and persistent classes , and MyBatiss It's for you SQL-Maping, Personal understanding is a kind of Hibernate After encapsulating the database , You can call the corresponding database operation statement HQL, and MyBatis It uses the original database operation statement .
- be based on 1 The reason in , be Hibernate Optimization is relatively MyBatis More difficult .
- MyBatis Getting started faster , and Hibernate It's relatively difficult to master .
- For advanced queries ,Mybatis It needs to be written manually SQL sentence , as well as ResultMap. and Hibernate There is a good mapping mechanism , Developers don't need to care SQL Generation and result mapping of , You can focus more on business processes .
- Hibernate Database portability is good ,MyBatis Database portability is not good , Different databases require different writes SQL.
Summary
summary :SSH Although I feel very heavy , But for understanding MVC Model even IOC It's not bad , It's quite suitable for practicing , however SSM It makes people feel fast , No matter for OOP Or face AOP Programming , It gives people a transparent pleasure .
Recent hot article recommends :
1.1,000+ Avenue Java Arrangement of interview questions and answers (2022 The latest version )
2. Explode !Java Xie Cheng is coming ...
3.Spring Boot 2.x course , It's too complete !
4.20w Programmer red envelope cover , Get it quickly ...
5.《Java Development Manual ( Song Mountain version )》 The latest release , Download it quickly !
I think it's good , Don't forget to like it + Forward !
边栏推荐
- HDU - 7072 double ended queue + opposite top
- Muduo simple usage
- 2022-1-12
- Detailed explanation of makefile usage
- 1. introduction to MySQL database connection pool function technology points
- Component development
- Freshman C language summary post (hold change) Part1 output diamond
- Byte order: big endian vs little endian
- Game (sanziqi & minesweeping)
- //1.14 comma operator and comma expression
猜你喜欢

Classical questions of function recursion

Cmake simple usage

Express framework installation and start service

Dynamic address book in C language (add, delete, modify, check (duplicate), delete, sort and export)

3. compilation and linking principle

Pychart installation instructions

Li Mu's notes on machine learning -1.2

1. Mx6u bare metal program (4) - GPIO module

Browser independent way to detect when image has been loaded

Module 8 job
随机推荐
Day500: keyboard line
Cmake configuration error, error configuration process, Preject files may be invalid
Classical questions of function recursion
1. Mx6u startup mode and equipment
Hello
Array part
Triangle judgment (right angle, equilateral, general)
On function overloading from several examples
There is no corresponding change on the page after the code runs at the Chrome browser break point
[cmake command notes]target_ compile_ options
Zabbix5 series - use temperature and humidity sensor to monitor the temperature and humidity of the machine room (XX)
Byte order: big endian vs little endian
165. cat climbing
8 vertical centering methods
Questions not written in the monthly contest
MySQL basic command statement
Debian10 LVM logical volumes
Use of higher order functions
Network module packaging
Anaconda creates a new environment encounter pit