wood burning stoves 2.0*
The moose likes Struts and the fly likes To the Author! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "To the Author!" Watch "To the Author!" New topic
Author

To the Author!

Mcgill Smith
Ranch Hand

Joined: Nov 11, 2003
Posts: 178
Hi Matt,
It seems that Spring framework will be very popular in the near future. Could you please explain how Spring is better than Struts or Tapestry. Also what do you see the future holding for these frameworks?

Thanks in advance.
[ October 26, 2004: Message edited by: Mcgill Smith ]

Regards
Mcgill
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
First of all Spring is a lightweight container this meaning it is not focused only to solve web problems (as struts and tapestry). Indeed, one of the many features offered by Spring is intended for solving web problems. Here you can use already included Spring MVC or even more interesting to plug your preferred web framework: struts, tapestry, webwork.

./pope


blog - InfoQ.com
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by Ali Pope:
Here you can use already included Spring MVC or even more interesting to plug your preferred web framework: struts, tapestry, webwork.


Any idea as to how spring enables us to plug in any web application framework? The basic concept behind that would help.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
The chapter 12 and 13 of the official (free) Spring documentation represents all you need to start this.

./pope
Mary Wallace
Ranch Hand

Joined: Aug 25, 2003
Posts: 138
There is a good tutorial in serverside. Pls check this web page
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114

It seems that Spring framework will be very popular in the near future. Could you please explain how Spring is better than Struts or Tapestry. Also what do you see the future holding for these frameworks?


I like Spring's MVC framework because it has a very clean separation of controller and view. It also allows you to use many view technologies: JSP/JSTL, Tiles, Velocity, FreeMarker, PDF and Excel. There's also talk of adding out-of-the-box support for JasperReports.

The one think I like better about Struts is it's rich set of HTML tag libraries. However, there is
a patch in Spring's JIRA that has JSP 2.0 Tag files to make form's easier to write.

I'm doing a talk at ApacheCon that compares the different frameworks and I also plan to publish sample apps that demonstrate how to use Struts, Spring, Tapestry, WebWork and JSF with a Spring middle-tier and Hibernate backend. These apps should be available in the next couple of weeks from my Equinox project.


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>
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
It is quite interesting for me how the big attention for Spring is attracted in the web application direction. I am using Spring for 2 different applications but without touching the web part .

./pope
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Talking about patches I think there is one also for enabling Spring to work with Hibernate 3 (alpha) - just for the courageous ones .

./pope
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
Talking about patches I think there is one also for enabling Spring to work with Hibernate 3 (alpha) - just for the courageous ones


Yep, the patch is in
Spring's JIRA.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Thanks Matt for the link... couldn't find it (too big list of bookmarks ).

./pope
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
Any idea as to how spring enables us to plug in any web application framework? The basic concept behind that would help.


Spring allows easy integration with Java web frameworks by offering a

ContextLoaderListener which can be easily configured in your web.xml. This listener will load a /WEB-INF/applicationContext.xml file by default and allows you to specify the files it loads by adding a "contextConfigLocation" as a context parameter. For example:



From there, it depends on your framework. The context is stuffed into the ServletContext and you can retrieve it using:



If you have a specific framework you'd like to integrate with - let me know and I'll try to post instructions for integration.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To the Author!
 
Similar Threads
Roadmap for Spring
future of spring
Spring reporting tool .
Spring and JBoss
Spring vs EJB