Friday, March 5, 2010

Choosing a Java EE Web framework

One of the things that has taken me the most time in making my first Java EE web app has been deciding on what web framework to use. I somehow neglected that maybe I would have gotten pretty far with just plain servlets in the beginning.

So one of the things you notice when looking at Java EE frameworks is that there seems to be a bit too many of them. This page lists about 60 in total. One of the first things I read about when learning Java EE was Struts 1 but after having gotten used to the idea of thinking about resources on the web, it felt slightly wrong to use a framework where URLs map to actions. Then I found out Struts 2 had a rest-plugin which I looked at, but the documentation was pretty poor and I couldn't really figure out how you would specify which controller "/", the root binds to. Later I found out about restlet and got interested in that. Then when reading about restlet I heard about Jersey which is the reference implementation of the JAX-RS (JSR-311 I think) which is the Java standard for making restful web applications. There doesn't seem to be any consensus about which of jersey and restlet is better as seen here. I think both are probably perfectly capable. At this momemnt I went with Jersey because it's planned to be a Java standard. I wouldn't mind trying out restlet in some other project later though.

No comments:

Post a Comment