当前位置:网站首页>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 !
边栏推荐
- 1. Mx6u bare metal program (4) - GPIO module
- Do you know the memory components of MySQL InnoDB?
- There are animation characters interacting with each other when the mouse slides in the web page
- Debian10 installing zabbix5.4
- SQL programming task02 job - basic query and sorting
- JS rotation chart (Netease cloud rotation chart)
- Debian10 configuring rsyslog+loganalyzer log server
- Classical questions of function recursion
- Binary String
- Li Mu's notes on machine learning -1.2
猜你喜欢

SQL programming task03 job - more complex query

Pychart installation instructions

JS - single sign on

Li Mu's notes on machine learning -1.2

1. Mx6u bare metal program (1) - Lighting master

Function part

Detailed explanation of clip attribute parameters

An interesting example of relaxed memory models

Constexpr keyword

Rebirth -- millimeter wave radar and some things I have to say
随机推荐
Express framework installation and start service
You can be what you want to be
Browser independent way to detect when image has been loaded
Autumn move script a
Ch340 and PL2303 installation (with link)
Binary String
[hdu] p7058 ink on paper finding the maximum edge of the minimum spanning tree
Anaconda creates a new environment encounter pit
C. Number of Pairs-Codeforces Round #725 (Div. 3)
Day260: the number III that appears only once
Branch and loop statements (including goto statements) -part1
Initial structure
Google benchmark user manual and examples
278. digital combination
Thread local storage understanding
165. cat climbing
Pat class A - 1012 the best rank (PIT)
//1.17 printf function
[cmake command notes]target_ compile_ options
Branch and loop statements (including goto statements) -part2
