Java Server Faces x Wicket: great framework of old paradigm vs new paradigm

Atenção, este blog foi migrado para: http://brunopereira.org

Just beginning 2008, I went to a new area, new team at Globo.com. There are several promising projects for this year, and this team switch will make it easier for me to properly evaluate and judge what I consider the 2 leading Java web frameworks nowadays.Like I said here, on my spare time I (try to) develop a lawyer application which uses Apache Wicket as its web framework. One of the projects I’m now working at Globo.com uses Java Server Faces. This should be a great opportunity to finally go deeply on both frameworks and see in which cases each one is better than the other. Based on what i have already studied and used of both, i do have some opinions that may or may not change several months from now.

First, a little background. When i was studying to pass the SCWCD exam, I saw enough of tag libraries to get really sick of them🙂 JSTL, Struts 1.x Taglib, Expression Language, etc etc etc. Every new taglib was a new syntax to learn, and the result of using taglibs to implement complex web pages is the famous tag soup. Not being a purist, although I don’t like scriptlets in general, I do think that in some cases they produce much cleaner code than the heavy use of taglibs.

Having said that, let’s start talking about JSF. Being a standard technology backed by Sun, and present on Java EE 5 specifications, you know that you’re gonna find plenty of support by development tools, many examples on the web and an already mature community of users to help you. JSF offers a huge set of components ready to use, and many of them are very pretty and easy to use. In my case, we’re using JBoss Tools + Rich Faces, and the Eclipse plugins avaiable here are just awesome.

Most of the web applications I have worked until now used Struts 1.x, and although Struts is by far the most successful Java web framework til now, developing with JSF is reasonably easier and more pleasant. However, even considering the clear evolution of JSF over Struts 1.x, I still qualify both within the same paradigm. That is, both have a massive dose of non-markup code in their views, and if you’re gonna work with them, you better have your spoon ready to dig into the tag soup🙂 Ok, ok, JSF offers very nice components and manages a lot of the work that was left to the developer in the old times, such as managing the application state and offering a beautiful presentation layer without requiring the direct manipulation of javascript. But you’re still going to have your view layer full of taglibs, coding in a special syntax (the custom tags syntax) that will make it tough to track for problems when they happen within the tag soup. You better have a magical spoon to manipulate it😉

Rather new in the Java web frameworks field is the very innovative Apache Wicket project. Wicket allows Java programmers to focus on what they do best: write Java code. No taglibs, how refreshing!🙂 Wicket also uses componentized development, and it isolates the view from your model in the best manner I have seen til now in Java frameworks. It does not seem so intuitive in the beginning, because you code for a web application in a similar way as you would code a Swing application. Specifically the component’s event handling code in Wicket reminds me a lot of the approach used in Swing applications.

Being a new framework that went out of the Apache incubation just several months ago, you can’t expect great tooling support at this point. Drag and drop tools to design screens? Forget about it! Component options similar to JSF ones? You’re not gonna find it either. However, Wicket has a very active community and it’s evolving fast. The second book on Wicket will be avaiable in a few months and the number of users and successful implementations is growing steadily. The set of avaiable components is growing and it’s becoming much easier to find support in their forums.

As I said, I’m far from an expert in both frameworks, and I hope this year I’ll have a long enough exposure to them and probably in a few months I’ll have more valuable opinions. Something I think about is that perhaps knowing Wicket and JSF well can be really useful, because it doesn’t seem like we have a “one size fits all” choice here. Wicket seems great for a company to base its developments and have good and maintainable code that will be easy to build over for several years. JSF certainly can offer that too, but i find it tough to consider taglib code as easy to maintain. However, JSF offers such great components that even a Java developer like me with no talent to create good looking pages is able to generate a very decent user interface.

I’ll confess I have a natural preference for Wicket since the beginning, but I promise I’ll try to evaluate these 2 options without any passion during this year and later this year I’ll post again telling my conclusions (if any)😉

11 respostas para Java Server Faces x Wicket: great framework of old paradigm vs new paradigm

  1. Eelco Hillenius disse:

    It never hurts to know multiple technologies. I hope you have fun in the process of learning them!

  2. blpsilva disse:

    Hi Eelco, I certainly do. Lots of fun!🙂 By the way, I really like your book! Wicket in Action (through MEAP) helped me understand most of the things I found a bit confusing on Pro Wicket. I’m really looking forward to get it full and in print, right beside me on my desk🙂 Congratulations for the great book so far, and for the work done in the framework!

  3. […] equipe nós já temos uma aplicação com JSF, que na verdade foi concebida ano passado, antes da minha mudança de equipe. Eu estou usando o Wicket em um projeto pessoal e ainda estou aprendendo o framework, ainda não o […]

  4. Estela disse:

    There can be a growing amount of babies it seems that
    have more than the usual messy spit-up habit. Breastfed babies decide to
    try solids a lot better than most formula fed babies because they’re used to receiving slightly different flavors all time.

  5. The Philippine decide upon borders service providers usually have larger leniency on prime of that capability to attain trades whilst the product or service or service is
    set up to help benefits and minimize obligations.

    95 replaces close to $100 worth of kitchen cookware clutter in 1 practical
    utensil.

  6. I don’t have area for extraneous and superfluous cooking gadgets that just get up space. The choices boil down to copper, aluminum, stainless steel, Teflon kind products and cast iron.

  7. But, for those who decide on one form, 1 shade, and one decoration it is possible to nevertheless make easy
    Halloween cookies from normal dough. Combine In Watermelon Juice, Watermelon Flavoring And Food Colour; Set Aside.

  8. Rochelle disse:

    Research finds that the newborn’s brain has got the capacity to receive nerve impulses then sort the signals it receives. Some parents state that there babies started walking with the age of seven or eight months.

  9. Cecila disse:

    If you are going for finest contents like me, simply pay a quick
    visit this web site everyday for the reason that it
    gives quality contents, thanks

  10. Sheree disse:

    I visited several web sites but the audio feature for audio ongs current at this web page is truly marvelous.

  11. It’s impressive that you are getting thoughts from this piece of writing as well as from our dialogue made at this time.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: