简体   繁体   English

类似于门户网站的iGoogle小部件间通信

[英]Inter Widget Communication for iGoogle like portals

I was looking for a platform where widgets developed using various technologies like Java can communicate with each other. 我一直在寻找一个平台,在该平台上,使用Java之类的各种技术开发的小部件可以相互通信。 In other words 换一种说法

When I add widgets to an interface I need them to talk to each other. 当我将小部件添加到界面时,我需要它们彼此对话。 For example A Click event in one widget should trigger an event in some other widget. 例如,一个小部件中的Click事件应触发其他某个小部件中的事件。

I have been looking into the web for solutions and ways to do it, but couldnt find anything concrete. 我一直在寻找解决方案和方法,但是找不到任何具体的东西。 Any pointers or information on this would be great. 关于此的任何指针或信息都将是很棒的。 Something like this http://blogs.oracle.com/pdblog/entry/inter_widget_communication_in_cross 像这样的东西http://blogs.oracle.com/pdblog/entry/inter_widget_communication_in_cross

Google also had a gadget to gadget communication API which was deprecated last year. Google还拥有一个小工具,用于去年开始不推荐使用的小工具通讯API。

You should also check out the pmrpc library - http://code.google.com/p/pmrpc/ . 您还应该检出pmrpc库-http: //code.google.com/p/pmrpc/ Pmrpc is a HTML5 JavaScript library for RPC-style (remote procedure call) inter-window, inter-widget and web workers communication. Pmrpc是HTML5 JavaScript库,用于RPC样式(远程过程调用)窗口之间,窗口小部件之间和Web工作人员之间的通信。 The implementation of pmrpc is based on the HTML5 postMessage APIs so communication can be cross-domain and is supported in most browsers. pmrpc的实现基于HTML5 postMessage API,因此通信可以跨域,并且在大多数浏览器中都受支持。

In short, pmrpc enables you to have a method-call-like style of communication between browser widgets, eg Google Gadgets. 简而言之,pmrpc使您可以在浏览器小部件(例如Google Gadgets)之间具有类似于方法调用的通信方式。

you could look into " postmessage ", which is a communications API defined in html5 and supported in most browsers (IE8 included) . 您可以查看“ postmessage ”,它是html5中定义的通信API,并且在大多数浏览器(包括IE8)中都受支持 for full cross-browser support (so including IE6/IE7) you could resort to the jquery postmessage plugin . 为了获得全面的跨浏览器支持(因此包括IE6 / IE7),您可以诉诸于jquery postmessage插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM