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 Raible , as compare to other MVC framework like struts, jsf .. how spring perform as compare among other framework in term of speed and stability
In my experience, Spring's MVC framework is just as stable and speedy as the other frameworks. In most cases, the performance of an application is hindered by the database throughput moreso than the MVC framework. If you have proper indexes in your database - performance shouldn't be a problem.
In Chapter 6 of Spring Live, I show how easy it is to use Velocity and FreeMarker with Spring MVC. Both of these are templating frameworks (like JSP), but they're a lot nicer to develop with since you don't have to wait for the initial-compile like you do with JSPs.
If you're looking for speed and performance, you can often hook in some sort of caching engine to really speed things up. I also recommend using a Compression (GZip) filter to compress the data you send to clients browsers.
If you want to compare Spring MVC, Struts and WebWork - my open source AppFuse project allows you to use any of these web frameworks - and it includes unit tests/tutorials for all of them.
hi, mr.Matt Raible , from your opinion, when should we use spring rather than struts ? if there is not much different between spring and struts, why the developer need to pay attention on spring ?
Joined: Jan 11, 2001
Originally posted by Alvin chew: hi, mr.Matt Raible , from your opinion, when should we use spring rather than struts ? if there is not much different between spring and struts, why the developer need to pay attention on spring ?
When you're tired of writing ActionForms and using BeanUtils.copyProperties() to transfer property values from your Forms to your POJOs. ;-)
The one thing that Struts has over Spring is a rich HTML tag library for forms. The good news is that if you're using JSP 2.0 - you can use these simplification tags for Spring.
To compare, below is a listing comparing 3 different JSPs - one from Struts, one from Spring and one from WebWork. You'll see that the WebWork one actually has the least amount of required code:
The best part of Spring is not its MVC Framework - it's the IoC container that allows you to inject your dependencies, rather than looking them up or using a Factory Pattern. You code becomes a lot cleaner and easier to test.