File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts Vs Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Vs Spring" Watch "Struts Vs Spring" New topic
Author

Struts Vs Spring

Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
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!


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209

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

Joined: May 14, 2003
Posts: 8
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 ]

Checkout my Java Blog at <a href="http://java.duska.com" target="_blank" rel="nofollow">http://java.duska.com </a>
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
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.


blog - InfoQ.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Vs Spring