使用Java EE 6进行RESTful Web开发 - 有哪些选择? [英] RESTful Web Development With Java EE 6 - what are the options?

查看:132
本文介绍了使用Java EE 6进行RESTful Web开发 - 有哪些选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在试图找出使用Java EE 6开发RESTful Web应用程序的最佳选择。例如,我希望能够像这样解释一个URL:

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

获取www.myapp.com/customers/1 - 返回一个网页,显示有关身份1的客户的详细信息。

GET www.myapp.com/customers/1 - returns a web page displaying details about a customer with id 1.

我只有两个选项可以想到的是

The only two options I can think of are


  1. 使用Spring MVC 3

  2. 使用允许你的JAX-RS规范渲染视图 - 我听说RESTEasy与Spring MVC集成?

是否还有其他框架可以让你开发这样的web应用程序?另外,我非常感谢有关为什么一个框架可能比另一个框架更好的见解。

Are there any other frameworks that will allow you to develop web applications like this? Also I would greatly appreciate insight as to why one framework may be better than another.

我的另一个考虑因素是您可以在框架中使用哪些视图技术?我听说很多视图技术与Spring MVC集成在一起,比如Velocity和Tapestry ......这些技术很容易集成,还是会遇到很多问题?一个重要的是我需要模板化(比如ASP.NET中的母版页)。

Another consideration of mine is what view technologies can you use with the framework? I've heard that many view technologies integrate with Spring MVC, such as Velocity and Tapestry... are these easily integrated or will I run into numerous problems? One essential is that I need templating (like master pages in ASP.NET).

我是Java EE世界的新手 - 我习惯于微软在哪里他们给你一个选择。我是ASP.NET MVC的忠实粉丝 - 有没有类似于Java世界的东西(或者是Spring MVC吗?)。

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

我是不要用于所有这些选择......帮助!

I'm not use to all these choices... HELP!

感谢您的任何建议/意见。

Thanks for any advice/suggestions.

推荐答案

我建议你看看:

  • RESTLet
  • Play
  • Grails with the REST plugin for Grails
  • Jersey
  • RestEasy

(但有一个问题:为什么你需要能够与Java EE集成?)

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

编辑:在你绝对需要的情况下o使用Java EE API,然后如BalusC所述, JAX-RS 是您的解决方案选择。 Restlet和Jersey都支持它。我不知道RESTEasy,但是JAX-RS维基百科页面提到它。

In the case where you absolutely want to use the Java EE APIs, then as mentioned by BalusC, JAX-RS is your solution of choice. Restlet and Jersey both support it. I don't know about RESTEasy, but the JAX-RS Wikipedia page mentions it does.

这篇关于使用Java EE 6进行RESTful Web开发 - 有哪些选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆