This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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 ]
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.
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.
Thanks Matt for the link... couldn't find it (too big list of bookmarks ).
Joined: Jan 11, 2001
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.