使用OSGi和GWT的Web应用程序 [英] Web Application using OSGi and GWT

查看:137
本文介绍了使用OSGi和GWT的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于使用OSGI和GWT作为用户界面的Web应用程序来说,这是一个很好的体系结构?

目标是使用bundle创建一组web界面部分。如果我添加新的包,它会在用户界面上添加新的功能(例如菜单),它们与现有的功能配合使用。 解决方案

p>请参阅关于GWT邮件列表的类似讨论 - http:/ /groups.google.com/group/google-web-toolkit/msg/4a3f912cb89a7256



总结 -
GWT的架构与您的运行时加载多个模块的要求。有一些方法可以在GWT中实现动态模块,但它永远不会是最佳的。



一般来说,您将为每个模块定义一个JavaScript接口,然后使用 GWT Exporter 从GWT中导出这些方法。然后你可以独立编译你的每个模块。然后,模块将在运行时使用您导出的JavaScript方法进行交互。



您付出的代价是性能。每个模块都将复制通用框架代码(GWT +您自己的框架代码),并且您无法做到避免它。


Which is a good architecture for a Web Application using OSGI and GWT as UI?

The aim is to use bundles to make bundles of web interface sections. If I add new bundle it will add new features (a menu for example) on the user interface, which cooperate with existing ones.

解决方案

Please see a similar discussion on the GWT mailing list - http://groups.google.com/group/google-web-toolkit/msg/4a3f912cb89a7256

To summarize - GWT's architecture is orthogonal to your requirement of multiple modules loaded at runtime. There are ways to achieve dynamic modules in GWT, but it is never going to be optimal.

In general, you would define a javascript interface for each of your modules, and then export those methods from GWT using GWT Exporter. Then you'd compile each of your modules independently. The modules will then interact at runtime using the javascript methods that you exported.

The price you pay is performance. Each module will duplicate common framework code (GWT + your own framework code), and there is nothing you can do to avoid it.

这篇关于使用OSGi和GWT的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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