RESTful Web Development with Java EE 6 - what are the options?

I am trying to figure out what are the best options for developing a RESTful web application with Java EE 6. For example, I want to be able to interpret the URL as follows:

GET www.myapp.com/customers/1 - returns a web page with customer information with identifier 1.

The only two options I can think of are

  • Using Spring MVC 3
  • Using the JAX-RS specification, which allows you to visualize views - have I heard that RESTEasy integrates with Spring MVC?

Are there any other frameworks that will allow you to create web applications like this? I would also be very grateful for understanding why one structure could be better than another.

Another opinion of mine - what viewing technologies can you use with the wireframe? I have heard that many viewing technologies integrate with Spring MVC such as Velocity and Tapestry ... are they easily integrated or have I encountered many problems? Essentially, I need templating (for example, master pages in ASP.NET).

I'm new to the Java EE world - I use Microsoft, where they give you one option. I'm really a big fan of ASP.NET MVC - is there something similar to what is in the Java world (or is it Spring MVC it?).

I do not use all of these options ... HELP!

Thanks for any tips / suggestions.

+6
java-ee rest java-ee-6 web-frameworks
source share
5 answers

I would recommend you take a look at:

(One question: why specifically do you need to integrate with Java EE?)

EDIT: in the case where you absolutely want to use the Java EE APIs, then, as BalusC has already been mentioned, JAX-RS is your decision choice. Restlet and Jersey support him. I don't know about RESTEasy, but the JAX-RS Wikipedia page mentions what it does.

+6
source share

This is not JavaEE, but simply JavaSE (some may say that Good Thing), but the Play Framework is RESTful, and in my opinion, it is also very nice to use.

+4
source share

I decided to go with Spring MVC. I did not go to JSF 2 because it is simply not very RESTful - it seems that a lot of work to get the RESTful URL (you need to use plugins), it has a state server side and is not action oriented. The game seems like a very cool map, but it is not ripe enough for me to justify its use (and I'm still not sure if you can use Java EE with it).

Spring MVC 3 allows you to display the URL RESTfully and is action-oriented - which I prefer.

I watched Grails, which looks very promising, but still relatively new, and it looks like it does not support Java EE 6.

+1
source share

I will make the second recommendation of Restlet . We have a large project that uses Java EE to some extent (some sessions without beans, Glassfish, bean timer, servlets, JDBC, JNDI). Restlet works very well: you can run a set of web services within a single Restlet-based servlet. You get great functionality for relatively little effort. We were very pleased with this.

+1
source share

Since you have a Rails background, I would recommend you take a look at the Scooter framework, which conveys a lot of useful stuff from Rails to Java. Like Struts and SpringMVC, it is an action-based MVC framework. He copes with calm routes. See residual URLs: http://scooterframework.com/docs/restful_routing.html

Its layer-level technology is just a JSP controlled by the SiteMesh layout infrastructure. But it also handles StringTemplate sample files.

+1
source share

All Articles