Search Menu

Wicket vs. Spring MVC

Peter Thomas wrote an interesting article about his first steps with Wicket, especially comparing it to Spring MVC:

For quite a while, I was trying to ignore the increasing buzz about Wicket, convincing myself that I don’t need yet another MVC framework (there are too many of them anyway), but somewhere between the Javalobby articles, the InfoQ article and the O’ReillyNet article – my resolve cracked and I took a closer look. (…)

It looked interesting and so I decided to try and migrate a selected few JSP screens of an existing Spring MVC + Spring WebFlow application to Wicket. This went much better than I expected and two months later (not full time) – I completed migrating the entire app to Wicket and it is now ready for a new release as a 100% JSP free application. (…)

So is Wicket the one true MVC framework that a lot of us have been hunting for? At the moment, I tend to think so. (…)

read the full article

It all sounds so familiar. Spring MVC, Spring WebFlow, XML configuration files, JSP with various tag libraries and custom tags, JSTL, Acegi, an unmaintainable collection of Javascript files and libraries, SiteMesh decorators, Velocity, web-designers who mess up JSP files and so on. Web development like this is error prune and not really suitable for an agile development process.

Wicket sounds very interesting and promising. I should give it a try but I guess I can not convince management to give us some extra weeks to convert the web-application we’ve been working on from Spring MVC to Wicket.

7 Comments Write a comment

  1. Well, it depends on where you are in the release cycle, but it might be a mistake to continue with Spring MVC if your product has more lifespan ahead of it than behind. There have been several posts to our lists and informal comments suggesting that Wicket is about twice as productive as JSF. I imagine it’s similarly better than Spring MVC. It may cost quite a lot of money to continue with Spring MVC if your project is going to be long-lived. That said, even if you wanted to switch, you’d still have to evaluate other factors.

  2. So Harald, now that you are management are you giving a Wicket trial the green light? Peter Thomas really made it look good in his post.

  3. Yes. We gave Grails a try in a sub-project and are now considering to replace it with Wicket since Grails doesn’t integrate with our continuous build system and the architecture of our platform.

  4. Any chance you could update this entry with some specifics about your experiment with Wicket, if it came to pass?

    I’m part of a team looking at a big migration away from Struts 1.x and the issue is…do we move to something like Spring MVC (new 3.0 release on the horizon) or perhaps move to Wicket? Your experiences would be good to ponder as we make our decision…

    An area of concern for me with a move to Wicket is the migration of what we have already in place.

    A move to Wicket would obviously mean replacing all our JSPs (some of which are just divs calling out to client side Javascript, and some of which are more full featured). I definitely see the attraction of a Java/HTML template solution such as Wicket offers.

    But we would need to do replacement in a gradual migration, so we can slowly replace our use of JSPs tags (core, 3rd party and custom) with the Java code equivalents. So JSPs and newer Wicket support would need to live side by side for a while.

    And that reworking of all the functionality in our taglibs/extraction of the JSPs into HTML templates/Java code is a big effort, though it may pay off in the long run.

    So any anecdotal evidence about porting existing MVC apps over to the Wicket framework, be they Spring MVC or Struts is helpful to us right now.

    Thanks a lot!

  5. Susan, we didn’t migrate from Spring MVC to Wicket but for a sub-project (one of the 5 web-applications of our product) we are now using Wicket and like it a lot. For a new project I wouldn’t use Spring MVC again.

  6. I think this article is very biased and does not depict the whole picture. In reality, just like JSF, Wicket requires you to use special tags within the HTML. If you expect your web designer to know or learn wicket tags you are in for a surprise. I still think that using Spring MVC is much more powerful, as long as you don’t use it with JSPs but with a templating framework like Velocity or Freemarker. Those use true HTML templates (no special tags, special imports or whatever) which can be easily editable with Dreamweaver or whatever WYSIWYG tool your web designer uses.

    On the other hand, if you still prefer to go for special tags in your ‘views’ (so long for pure HTML) JSF 2.0 is probably the way to go (which btw also considers JSPs obsolete) which uses the concept of Facelets (xhtml files with some special tags just like Wicket), with the difference that it is standard J2EE. You will be more likely to find developers who know that technology than wicket.

Leave a Comment

Required fields are marked *.