Model-View-Controller is everywhere now days. I’ve been testing two open source frameworks which look great:

  • VRaptor: Apparently easy to use, easy for REST services development, looks brilliant. However, I spent two hours struggling with Tomcat in order to add permissions for the sample application to run. None of the exceptions regarding these permissions where in the documentation. I had to edit file /etc/tomcat6/policy.d/04webapps.policy on Ubuntu 9.10 adding several lines (permission java.lang.RuntimePermission “getProtectionDomain”, “read”;). Eventually I got a serialization exception and discarded the framework. Too much time to make the sample application run.
    I noticed that writing integration tests looks easy but the ones found in the documentation where called “unit test” when they are not unit tests, they are integration tests. That is the reason many people believe that just because JUnit is running the test it is a unit test, when it is not.
  • Play! Framework: Very similar to VRaptor but much more easy to get started with. The framework runs a development server out of the box which makes it very easy to try out your first application within minutes. It has a command line tool similar to Django which rocks.  The only think I don’t like so far is that controller actions are “static” which makes unit testing controllers impossible. Fortunately the FunctionalTest class is great to write those kind of tests so I would move the business logic out of the controllers so I can test-drive it, and use the controllers just to wire up views and models. It would be great if they remove the static constraint in future versions of the framework.