RESTful JSF是否可能? [英] Is RESTful JSF possible?

查看:119
本文介绍了RESTful JSF是否可能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我坐下来向JSF移植了一个简单的Rails应用程序(使用Seam),以提高自己的生产力.Rails应用程序是RESTful,我很喜欢.开始使用JSF时,令我惊讶的是,也许是错误地得知,JSF仅支持POST,这使其本质上是非RESTful的.

I recently sat down to port a simple Rails app I have to JSF (using Seam) to get a feel for which I would be more productive in. The Rails app is RESTful, which I like. Upon starting into JSF, I was surprised to learn, perhaps incorrectly, that JSF only support POSTs, which makes it inherently non-RESTful.

我搜索了一下,但找不到满意的答案. JSF/Seam似乎很受欢迎,但是对我来说,它禁止除POST之外的所有HTTP方法都没有道理. JSF固有地不允许使用RESTful架构,这是真的吗?或者我错了,并且RESTful JSF是可能的(固有地还是通过插件)?

I searched around a bit but cannot find a satisfactory answer. JSF/Seam appears to be very popular, but it doesn't make sense to me that it would forbid all HTTP methods but POST. Is it true that JSF inherently does not allow for a RESTful architecture, or am I wrong and RESTful JSF is possible (inherently or through a plug-in)?

推荐答案

这是一个

Here's a blog post that works through this question, though it doesn't reach any solid conclusions.

根据我的个人经验,JSF/Seam实际上并不是很流行,这在很大程度上是由于这类问题引起的.似乎非常努力地从网络的基本本质上抽象出来,然后破坏诸如GET之类的东西.该修复程序(针对您遇到的任何问题)总是在下一版本中出现",或者如果您拥有好的工具,则不是真正的问题". YMMV,但我可能会看看其他堆栈.

In my personal experience, JSF/Seam aren't actually very popular, due in large part to these sorts of issues. It seems to try very hard to abstract away from the underlying nature of the web, and then breaks things like GET. The fix (for whatever problem you're having) is always "coming in the next version" or "not really a problem if you have good tools." YMMV, but I'd probably look at a different stack.

我听说过有关 Restlet 的好事,并且我看到 REST插件.在Spring 3中,Spring MVC 添加了对REST的支持.我曾与 Grails 一起工作,这使得做RESTful事情变得相当简单.它具有额外的好处,因为您对Rails很有经验,所以应该对它非常熟悉.

I've heard good things about Restlet, and I see that Struts 2 has a REST plugin. With Spring 3, Spring MVC has added support for REST. I've worked with Grails, and it made doing RESTful things fairly straightforward. It has the added bonus that it should be very familiar to you, since you're experienced with Rails.

这篇关于RESTful JSF是否可能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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