我如何在GWT中为插件添加对Web应用程序的支持? [英] How do I add support for plugins to a web application in GWT?

查看:95
本文介绍了我如何在GWT中为插件添加对Web应用程序的支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一个笔记应用程序,我想支持插件,以便用户可以通过添加来自第三方开发人员的插件来获得额外的功能。唯一的问题是我不知道如何在GWT或javaScript中执行此操作。我愿意在javaScript中完成,但我更愿意在GWT中完成。我希望它能像这样工作:
第三方开发者制作插件,插件将实现我制作的界面。
他们将代码上传到我的服务器
用户选择他们想要的插件
当用户转到我的应用程序时,那些插件将会在那里,以便他们可以使用它们。
我知道这样的事情是可能的,因为谷歌的wave有很多不同类型的扩展。

I'm making a note taking application and I want to support plugins so that the user can get extra features by adding plugins from 3rd party developers. The only problem is that I don't know how to do this in GWT or javaScript. I'm willing to do it in javaScript but I'd prefer to do it in GWT. I'd like it to work like this: the 3rd party developer makes the plugin and the plugin would implement a interface I made. They upload the code to my server The user selects the plugins they want Whenever the user goes to my app those plugins will be there so they can use them. I know that something like this is possible because google wave had many different types of extensions.

推荐答案

不幸的是,GWT不会帮助你插件 - 原则上,GWT假定它具有应用程序所需的所有源。所以要实现它,你需要去JSNI发现并加载插件。这里有更多细节:如何让你的GWT应用程序可插入?

Unfortunately GWT won't help you in plugins - by principle, GWT assume it has all the sources needed by application. So to achieve it, you you need to go down to JSNI to discover and load plugins. Here are more details on that: How to make your GWT application plug-able?

我也建议寻找您在问题中提到的Apache Wave源代码(以前的Google Wave)。 http://incubator.apache.org/wave/

I would also suggest looking into Apache Wave source (former Google Wave), which you also referred in your question. http://incubator.apache.org/wave/

这篇关于我如何在GWT中为插件添加对Web应用程序的支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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