1

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,

Community
  • 1
  • 1
Elio
  • 463
  • 6
  • 18

4 Answers4

5

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,....)

ddewaele
  • 22,363
  • 10
  • 69
  • 82
  • Idd, we already did lot of studies and finally decided to integrate other frameworks such as spring security and spring DM, it tooks us a lot of time to even decide to do this change. By you know, since Spring Security already uses Spring , this means ill have struts2 handler and spring handler wich both do the same thing in my case, execpt that Spring security is much more useful for me since I am interested in using ACL. – Elio Jun 21 '11 at 07:17
  • 2
    @Elio Spring Security works perfectly with Struts2. Every request before entering your struts2 application will be intercepted by spring security filter, necessary checks will be performed and whatever the result is you can decide which struts2 action handle it accordingly. e. g. if you need to authenticate the user you just can tell spring security to redirect to an action mapping that present your login form. – doctrey Jun 21 '11 at 08:21
  • @doctrey thanks for the input, yea honestly thats what was worrying me, since I will be using RBAC at the methods/resource level. But I think ill leave struts2 afterall :) – Elio Jun 21 '11 at 08:23
2

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.

Buhake Sindi
  • 87,898
  • 29
  • 167
  • 228
2

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.

Simeon
  • 7,582
  • 15
  • 64
  • 101
0

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

rjb
  • 1