*
The moose likes Other Application Frameworks and the fly likes From Struts to Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "From Struts to Spring" Watch "From Struts to Spring" New topic
Author

From Struts to Spring

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5131
    
  12

I have been developing web-applications with Struts since June 2004. Is it worthwhile to change for every application to Spring, or is this just another framework besides Struts (and some others)? Or is it specifically meant for some kind of application (working with EJBs or something like that)?
If you are an intermediate struts developer: would changing to Spring be very difficult (for me as developer) and time-consuming (changing jsp's, action forms, action classes,... to SpringMVC)


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
If I'm not mistaken, EJBs are a big no-no in Spring. To Spring, EJBs are the culprits that make J2EE applications too heavy-weight.

Correct if I'm wrong.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Christopher DeBracy
Greenhorn

Joined: Feb 22, 2004
Posts: 4
You can use Spring and still continue to develop with Struts, Tapestry, JSF, etc. Spring offers its own MVC framework, but you're not required to use it.

I've been using Tapestry lately and looking forward to integrating it with Spring to see how well everything works together.


SCJP 1.4<br />SCWCD<br />SCBCD
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
Originally posted by Cheng Wei Lee:
If I'm not mistaken, EJBs are a big no-no in Spring. To Spring, EJBs are the culprits that make J2EE applications too heavy-weight.


Spring doesn't really discourage the use of EJBs, in fact, it
makes EJBs easier. However, most applications don't need EJBs because they'll only ever run on a single server and they don't need the distributed/remote stuff that EJBs provide.

Also, Spring provides many of the services of an EJB container: i.e. declarative transactions and security (via Acegi Security) and makes it much easier to "test" your code. Testing EJBs is hard out-of-container.


Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Originally posted by Christopher DeBracy:

I've been using Tapestry lately and looking forward to integrating it with Spring to see how well everything works together.


I think Matt forgot to mention that appfuse integrates Spring/Tapestry/Hibernate

You may find that a useful starting point for your Spring/Tapestry integration.

Cheers
[ February 23, 2005: Message edited by: Sonny Gill ]

The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
 
 
subject: From Struts to Spring
 
Similar Threads
Struts or Spring?
struts 1.2,Spring 2.0 INtrgration
Spring
Spring & Struts
Framework for application