This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Spring live book - Performance issue

 
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ..thank you !!
 
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Alvin chew
Ranch Hand
Posts: 834
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Matt Raible
author
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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:

  • Struts JSP
  • Spring JSP
  • WebWork JSP


  • 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.
     
    Uh oh, we're definitely being carded. Here, show him this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!