Take that, Ruby On Rails

The Digg entry for Wicket’s 1.3 release announcement on The Server Side has an interesting comment: “I recently converted a Rails site to Wicket. Wicket really cuts down on template spaghetti code. I can honestly say that wicket’s OO approach is the right way of doing things for web application development. If anyone is interested in the site I mentioned, http://fabulously40.com/ “.It’s good to read a statement like this in public for a change.

20 thoughts on “Take that, Ruby On Rails

  1. I can confirm similar results on my own experimental projects. I’ve never done anything “real” with Rails, because every time I get reasonably far into the project, things become too unwieldy and I run back to Wicket. :-)

    For dirt-simple CRUD stuff, Rails is unbeatable. But if you get *anywhere* beyond basic scaffolding, Wicket is going to be far less painful. Let’s also not forget that Wicket is Java, and so its tools are far above-and-beyond anything Rails can match.

  2. Wow, http://www.dzone.com/links/rss/take_that_ruby_on_rails.html got voted off right away. Don’t anger the RoR kids!

  3. Lars Hoss says:

    Wicket is one of the best web frameworks out there. And I tested lots of them (Struts, JSF, Spring MVC, Rails, Django, Plone …). But nothing comes close to the elegance of Wicket. The thing with Wicket is, however, that you need to know about OOP/OOD. Many web developers are so used to “hacking” that they will refuse to give a true OO framework a try. But it’s absolutely worth it imho. Wicket makes developing complex apps so much more easier and much more maintable.

  4. Chris Colman says:

    The most unbeatable combination I’ve found so far:
    Wicket+JPOX = everything just works on two massive enterprise apps we have developed. Complexity of the app does not increase exponentially as the functionality of the app increases. It’s much closer to a linear increase – which is the ideal.
    I just get the feeling the RoR lads are people who can’t be bothered/don’t understand/too close minded to learn OO. Far too many recent ‘popular’ technologies give false hope that their developers can build applications without understanding basic OO architectural principles that have been established and proven themselves over at least 20 years, yes even before the www was invented.
    OO is the only true way to avoid the complexity of your app spirally out of control exponentially as it grows. This was true in the days of desktop application development in C++ and it is true today in web app development in any language.
    Wicket authors realized this and have created a truly component based OO framework that unashamedly embraces the full power of OO to allow Java developers to build extremely large, scalable enterprise web applications while maintaining a manageable, robust, high quality and elegant architecture and code base.
    There, I said it.

  5. @Lars – you didn’t list my new favorite, Seaside (http://seaside.st) on your list. It’s a scaleable contination-based web framework written in Portable Smalltalk (ports easily to the four big Smalltalk players).

  6. Tim O'Brien says:

    If you are doing something with a very rich interface, something that has to keep track of DOM ids, then doing this in RoR with RJS is a real PITA. Wicket (and other component-oriented approaches) take the burden of keeping track of all of this.

  7. Tim O'Brien says:

    But, I forgot to say, that isn’t to denigrate RoR, it certainly has a place at the table – the simple CRUD application. You can’t beat RoR for this (but, then again, the simple CRUD app isn’t very interesting).

  8. Aye says:

    The more I work with RoR, the more I think I’m in JSP land again but now its just called ERB templates (with RJS)! I realize more and more that it’s the Ruby language that I’m enjoying and not entirely RoR. You’re going to think I’m crazy but I wish you guys would also port Wicket to Ruby.

  9. You’re crazy Aye! ;-) Seriously, I didn’t like at all the little I’ve seen from RoR, mainly because it reminded me so much of JSP. With a few generation tools yes, but that’s not the stuff I care about personally.

    As for converting Wicket to RoR. It would be better to start over and create something that might use some of the same ideas (stateful OO programming), but takes full advantage of the language. So it would and should look different than Wicket for Java.

  10. Denis says:

    Hey guys,

    what do you think how I found this blog? I am desparatelly looking for something like wicket written in ruby, without finding something.
    Nothing beats the elegance of wicket! I was jumping as I read the wicket book, this is the next step for me and the most funny thing, it could be technically done even before struts and jump over all the ugly frameworks like JSF! I am actually new to RoR as I was all the time in Java, and now I feel exactly the same like Aye, only the ruby language itself is the real gain, this was my thought immidiatelly. I think I will end up programming java again hopefully with wicket.

  11. Denis, if you don’t like Java, but you like Wicket, you could take a look at Scala with Wicket. See for instance this article. Or look at the Lift framework for Scala… quite nice :-)

  12. Denis says:

    Hey thanks for the hint, scala with wicket??? I heard a lot about scala this should be the coolest language ever, many thanks. I will definitelly look at that.

  13. Scala can use Java classes directly, so you can use Wicket directly. Same goes for Groovy btw. Nice thing about Scala – like Nathan’s article describes – is that you can make a bunch of things really a lot shorter. Personally, I really like the idea of passing in functions instead of models and the really short notation for overriding methods (isVisible and stuff, though you could implement that to take functions as well if you want). Tooling is a bit rough still, but if you like coding with Ruby, you’re probably not too bothered by that :-)

    have fun!

  14. Eelco –

    The suggestion was not to port Wicket to Rails, but to Ruby. Big difference. Wicket is a great product, but using Java to drive it is a PITA. Has anyone successfully used Groovy or JRuby to write Wicket apps?

    Thanks for all your work on Wicket.

    – Keith Bennett

  15. Keith,

    Yeah, mistake from my side. I got that you (Aye?) meant Ruby, not RoR. Same applies still though. Much of how Wicket is build up is to leverage static typing, and I would probably make different choices for quite a few things when creating a framework for Ruby. That said, we (Juergen in particular) have been successful using Groovy with Wicket, and there are a few blogs posts about it as well somewhere. I expect that JRuby can be used in a similar fashion, with similar benefits and downsides when it comes to using Wicket.


  16. Alessandro says:

    What I liked about RoR and Django is the no-SQL approach. I write some models, declare the relationship, and the database tables are auto-created. It’s , relatively, database portable. And the methods to query the database are auto generated.

    Where should I look to have the same functionalities in Java?

    Also, there is a template generator for wicket? I mean have Page classes and html templates for a basic CRUD app automatically generated given the models?

    • Maybe Grails is a good match for you Alessandro. It provides RoR like CRUD functionality and you can later decide what rendering technology to use (including Wicket).

    • Tetsuo says:

      If you are so eager to not be able to use completion, refactoring, and code navigation (like with Ruby), you can use Groovy.

      It compiles to Java (and since version 1.7 it has support for annonymous inner classes), so it can be used seamlessly with Wicket.

      But its tool support is still in the stone age compared to Java’s (even with the latest enhancements). A little better than Ruby + Textmate, true, but not much better. Well, you ruby fans seem to like this kind of pain so, go for it!

      For auto-creation of tables, use Hibernate (look for hbm2ddl.auto in its ref manual). It’s way more db-portable than Rails (since it requires you to do the heavy stuff in native SQL). It doesn’t have the magic auto-generated query methods, but it has the Criteria API (much more useful, IMO). And use Hibernate, not JPA (a commitee-driven standardized subset of the former).

  17. Francis says:

    RoR people don’t get OO – from Java heads? Are you serious? The language where everything is either and int or a String?

    I can do things like 5.days.ago

    Writing fluent DSL’s is trivially easy.

    *everything* is an object. Everything statement has a return value, even if. Java is C++ with the interesting bits taken out.

    I don’t mind Java – but I didn’t understand OO properly until I stopped using it.

    (and don’t get me started on the corporate “we don’t trust you” making String final, just don’t)

    • Hey Francis. Who said Ruby people don’t get OO? Wasn’t me. I think you can use Java in an OO fashion just fine, but unfortunately lots of frameworks don’t encourage you much to do so, whether it is the web mvc frameworks that let people think about everything in terms of request/ response, of frameworks like Spring that have a solution for everything you just configure rather than code for the case.

Comments are closed.


Get every new post delivered to your Inbox.

%d bloggers like this: