Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Vs Spring

 
Chengwei Lee
Ranch Hand
Posts: 884
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matt,

I'm totally new to Spring. What I do know about it is minimal - it is a MVC framework.

But so is Struts. And Struts has wide support & is commonly used. So what would the compelling reasons for me to learn & use Spring over Struts?

Are they competing frameworks? Or they could complement each other nicely? Is Spring designed to work with Hibernate only? Can I use other OR tools such as OJB?

Is there a quick start or a skeleton web application to jumpstart the developing process in using Spring?

Cheers!
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What I do know about it is minimal - it is a MVC framework.


Guess this question has been answered previously. But I would change this

it is a MVC framework.


to

Spring provides a MVC framework as well.

So yeah Spring 'MVC' and Struts are probably competing out there. But guess Spring allows you to plug-in any web application framework you want. Spring MVC happens to be another option thats all.


Is Spring designed to work with Hibernate only? Can I use other OR tools such as OJB?


Lookslike Matt already has
this
for you!
 
Jeff Duska
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to read the docs over at Springframe Site to get a better understanding of Spring.

Spring is a lightweight IoC container like PicoContainer. These containers support for Dependency Injection. Dependency injection is a powerful tool by itself, but cool thing about the Spring is that they aren't forcing you to use a particular MVC, or data access method. Spring supports JDBC, Hibernate, iBatis and more for database access. And for your question it supports Struts, Spring MVC, WebWorx and etc for MVC. It also has cool things like AOP support.

HTH,

Jeff Duska

[ October 27, 2004: Message edited by: Jeff Duska ]
[ October 27, 2004: Message edited by: Jeff Duska ]
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeff I would like to correct a little bit:

Dependency injection is a powerful tool by itself,


no, it is a principle.

Moreover there is no direct relation between a IoC/DI solution and a MVC solution. Spring has chosen to use this in order to provide a full blown lightweight solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic