This week's book giveaway is in the Open Source Projects forum.
We're giving away four copies of Spark in Action and have Jean-Georges Perrin on-line!
See this thread for details.
Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Spring vs Struts Framework

 
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to compare these two. I'm little bit conversant with Struts. I just want to know how we can compare both Spring and Struts??
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts is really only for the web tier...

At the core, Spring is a bean container with dynamic injection that can run anywhere. But there are lots of other projects that fall under the Spring umbrella... Spring's web MVC framework is called Spring MVC. Spring WebFlow is another framework built on top of Spring MVC that provides further functionality.

A better comparison would be between Struts and Spring MVC/Spring WebFlow.

I'm not sure how you'd go about doing a direct comparison either... though you can google "Spring Struts comparison" and find lots of material
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kumar,

First and foremost as you already know Struts is just an mvc framework, which was proven to be very successful for a lot of j2ee projects. It was in the right place at the right time and (at that time) it was noting else to chouse from. Spring on the other hand is a lightweight container, which also provides mvc support or it could integrate with Struts as well (if for any reason the project demands using struts rather than spring mvc). In other words Spring does what Struts does and quite a lot more, but not the other way around.
There are many ways to look at both technologies in order to pick the right one. Struts in my opinion is far from being the best framework of all, but is still largely used, especially with older j2ee projects. There are also a lot of people that used Struts for years and they will probably still keep doing it for a while. Because in many cases the team�s skill set is one very important reason for choosing a technology, probably many companies will rather prefer using Struts even today. To make long story short, I would say that Struts is still the NOW. Will it still be TOMORROW? I seriously doubt that, but this is only my opinion.
Regards.
 
Joe Harry
Ranch Hand
Posts: 10192
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,

That was a pretty good explanation! By the way do you know any good material for learning the Spring Framework??

My other doubt is that, what will happen to the newly released candidate EJB 3.0 when there is such a thing called spring??
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You�re very welcome Kumar.

I personally started with Spring in Action by Craig Walls and Ryan Breidenbach and I found it really, really good. It�s very well written and explains everything very well. It�s a good book for beginner as well as more advanced Spring users. Another very good source is the online documentation:

http://static.springframework.org/spring/docs/2.0.x/reference/index.html

As for the newly released ejb 3.0, I�m not sure if anybody knows for sure what�s going to happen. We can only guess though and I�ll tell you little bit of my experience. In last couple of years I worked for two pretty big corporations in USA and I got the opportunity to meet with really bright and senior people. They all "confessed" that they�re not doing ejb development anymore and are looking forward to see some of their new applications deployed on tomcat. Other, which are still managing old legacy ejb projects also "confess" that they�d whished to never start their projects using ejbs. My opinion though is that there is a growing feeling within the j2ee community that ejb really screwed things up. Besides unlike seven years ago we have good choices (and already proven to be good!) to choose from. It�s a shame though but the big guys have been severely beaten by a handful of developers, many of them working for free as a free open source community.

The actually reason I don�t give much chances to ejb 3.0 to take over is because the big guys will never change their monolithic, oligarchic way of owning and releasing software. As an example look at jdk itself: I got certified with jdk at the end of 1.4 in 2004, when jdk 1.5 was on the verge. And what a release� Never got a chance to touch 1.5 and never seen anything like 1.6 in my life. And what is the latest jdk release? 1.7?! In less than three years? You must kidding me! And they all used to blame Microsoft for this kind of oligarchic approach...
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic