是否有任何适用于 jsr168 和/或 jsr286 的 cpython 库?

发布于 2024-08-03 10:13:17 字数 701 浏览 5 评论 0原文

在 Java 门户上,您可以拥有包含其他应用程序提供的数据的 portlet。我们希望用 Django 应用程序替换现有的 Java 门户,这意味着复制 Java 门户显示 portlet 的能力。我们想要复制的两个 Sun 规范是 JSR168 和 JSR286。

我需要一个 cPython 解决方案。不是 Jython 或 Java。没有什么反对这些工具,我们只是不使用它们。根据记录,基于 Jython 的 Portletpy 的做法与我们的目标相反。

另外,我怀疑这个问题是由于我们对 JSR168/JSR286 规范如何工作的误解而引起的。我认为 JSR168/JSR286 是一种神秘的协议,用于在单独的应用程序之间通信某种内容,但在 Java 世界中,这往往是通过其他方法(例如 SOAP)来完成。相反,问题可能在于这些协议只是如何在视图中显示内容对象的定义。如果我们所要做的只是处理 SOAP 调用并显示数据,那么整个问题就没有意义了。

下面是我们认为我们想要做的简单架构图:

替代文字

On a Java portal you can have portlets that include data provided by other applications. We want to replace our existing Java portal with a Django application, which means duplicating the Java portal's ability to display portlets. The two Sun specifications in question that we want to duplicate are JSR168 and JSR286.

I need a cPython solution. Not Jython or Java. Nothing against those tools, we just don't use them. For the record, the Jython based Portletpy does the opposite of what we are aiming to do.

Also, I suspect this question has been caused by a misunderstanding on our part of how the JSR168/JSR286 specification works. I think that JSR168/JSR286 is an arcane protocol for communicating some sort of content between separate applications, but in the Java world that tends to be done by other methods such as SOAP. Instead, the issue might be that these protocols are simply definitions of how to display content objects in views. If all we have to do is handle SOAP calls and display data, then this whole question is moot.

Simple architecture image below of what we think we want to do:

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不及他 2024-08-10 10:13:17

我不确定你能做到这一点。来自 JSR 168:

JSR 168 请求/响应处理

如果我理解正确,您希望 Django 应用程序取代图中现有的“Java Portal/Portlet Container”。不幸的是,Portlet 容器和各个 Portlet 之间的接口使用内存中 API 调用,而不是作为 Web 服务。没有简单的类似 URL 的界面,您可以调用 Java 片段来获取 HTML 块,然后将其合并到 Django 提供的页面中。

JSR 286 是一个更新,虽然它改进了 portlet 之间的通信机制以及从 portlet 提供资源的机制,但它并没有真正从根本上改变上述模型。

我并不是说这不可能完成——只是没有简单、标准的方法来做到这一点。

I'm not sure you can do this. From JSR 168:

JSR 168 Request/response Handling

If I understand correctly, you want the Django application to take the place of the existing "Java Portal/Portlet Container" in the diagram. Unfortunately, the interface between the portlet container and the individual portlets is using in-memory API calls, not as a Web service. There's no easy URL-like interface where you can call into the Java piece to get a chunk of HTML which you then incorporate into a Django-served page.

JSR 286 is an update and while it refines the mechanisms for communicating between portlets, as well as serving resources from portlets, it doesn't really change the above model radically.

I'm not saying it couldn't be done - just that there's no easy, standard way to do it.

哆啦不做梦 2024-08-10 10:13:17

解决这个问题的一种方法是使用 WSRP(远程 Portlet 的 Web 服务,请参阅维基百科)生产者,它将 JSR 168/286 转换为 Web 服务并从 django 使用它们。但 WSRP 似乎还不是很流行,而且我找不到任何 Python 平台实现(尽管可能存在部分工作)。除此之外,我对这个话题也很感兴趣。

One way to get around this could be using a WSRP (Web Services for Remote Portlets, see Wikipedia) producer, that converts a JSR 168/286 into web services and consume them from django. But it seems that WSRP has not been very popular and I couldn't find any Python platform implementations (although partial works could exist). Beside this, I'm also interested in this topic.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文