I am developing a new large scale complex web application (which is a rewrite of an old web application that uses Struts 1.x, POJO, JSP (integrated with Struts tag libraries) and a system written in Oracle Forms) and am trying to decide whether I should use Struts 2.0 or Spring ... but I am confused ..... is it one or the other or do they work in conjunction with each other. I am trying to follow the threads and information from searching the web and I am getting conflicting results. Can someone please explain??
So what is your suggestion.....using both Struts and Spring or just Spring MVC. It almost seems it would be easier to use Spring MVC because then you are only working with one product instead of two???
Vishwanathan Nagarajan wrote:Well Jennifer, actually there is a ton of difference between Spring and Struts. They are used in totally different contexts, which I would say from my experience of working with both the frameworks.
I would suggest you go through the following link,
You can only compare Spring MVC to Struts when you want to compare similar things. But you cannot compare core SPring Framework with Struts because they are completely different things for different purposes.
Spring (the core framework) should be in my opinion definitely be used.
When it comes to choose between Struts 2 and Spring MVC I suggest to build a small application with both and take the one you prefer. I personally prefer Struts 2 because in my opinion it's more straight forward. On the other hand I have to deal with an web application with Spring MVC at work.
In both cases Spring (core) was used. And it's even possible to use all three of them together (just in case you want to change for any reasons, even though I would not recommend that.)
Also note that Struts 2 is not a continuation of Struts 1, but instead Web Works renamed as Struts 2.
Not that that is a bad thing, I just think it is funny that Web Works to get a bigger promotion basically changed its name to Struts 2, to jump on Struts popularity and name. (ps, I don't know the exact story, so this is my take on the whole thing)
Mark Spritzler wrote:(ps, I don't know the exact story, so this is my take on the whole thing)
It's probably close to the truth:
Ted Husted, developer of Struts admitted in an email that WebWork is very similar to Struts 1.x and in fact does certain things better than Struts. Both Husted and Lightbody's rationale was that combining WebWork's superior technology and Struts' superior community could only have a good effect on the Java community as a whole.