Replacing Struts2 with spring mvc

2019-08-03 11:37发布

I've seen plenty of questions about the difference between Struts2 and Spring MVC. But my question is the following:

I have a large-scale web app that needs reworking and its based on Struts2. What I want to do is integrate Hibernate + Spring + Spring Security + Potentially Spring DM ( since we want to make it as modular as possible).

Now as you can see its already a lot of reworking, so I am wondering IF in case I leave Struts2 (to reduce a tiny bit my rework) would this cause a significant perfromance issue in the future?

My question is mainly a continuation the question asked by others before. However what I am interested in is not if its possible, more like what would cost in terms of performance if I keep Struts2.

Thanks,

4条回答
Bombasti
2楼-- · 2019-08-03 11:51

I don't think that can be answered without making performance test and profiling, because any performance bottlenecks would likely be in your use of the frameworks rather then in the frameworks themselves.

I'd strongly recommend testing before making estimations about the performance.

Also if you're going to switch to Spring MVC only on performance grounds my advice would be: don't do it.

查看更多
对你真心纯属浪费
3楼-- · 2019-08-03 11:53

Modular? Really? You mean your S2 app isn't crafted that way? You can leverage Spring for DI purposes and take a look a the OSGI plug-in. Rewriting your app to use Spring MVC is waste of your IT dollars IMO. Good luck. @jeffblack360

查看更多
【Aperson】
4楼-- · 2019-08-03 11:57

I don't see "performance" as a key factor in the decision of replacing Struts2 with Spring MVC.

If your application currently has performance issues, I doubt that the core Web framework being used (Struts2 or Spring MVC) are the cause of it.

Most likely it's going to be the usage of the framework, or something unrelated to it (backend processing, database queries,....).

If your application doesn't have performance issues, replacing a technical component like Struts with Spring MVC will not influence it. Neither frameworks have major issues and are used in production environments without known performance issues.

The decision to switching to another framework should be based on other factors (support model, community support, functionalities offered by the framework, strategic architectural alignment,....)

查看更多
啃猪蹄的小仙女
5楼-- · 2019-08-03 12:10

My advice: If the application is not broken, don't fix it. Look at the cost to replace Struts2 to Spring MVC and the benefits (include the revenue generation too). If the ROI is less than expenses, then don't do it.

查看更多
登录 后发表回答