SmartGWT 与 GWT?
问候 , 我已经使用 GWT 几个星期了,想要一个丰富的表格小部件。我遇到了 SmartGWT 库。 我可以像使用 GWT 开发一样使用 SmartGWT 小部件吗?或者有什么我需要了解的特殊事项吗?
谢谢
Greetings ,
I have been using GWT for few weeks and wanted a rich Table widget.I came across with SmartGWT library.
Can I use SmartGWT widgets same way I develop using GWT or is there any special things I need to know ?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
是的,您可以采用 SmartGWT 中的单个小部件,但它确实有一些注意事项。
正如另一位发帖者指出的那样,您将加载大部分核心 SmartClient 运行时。您可以通过继承 SmartGwtNoScript 模块并仅包含您实际使用的底层 SmartClient 模块(基本上是 Core、Foundation、Grids)来避免加载不需要的 SmartClient 运行时部分。
这仍然是一个大型网格组件,因此请仔细考虑。
您的用户使用高速连接吗?然后他们就永远不会注意到,那就去做吧。
他们使用该应用程序有一段时间还是经常使用?那么一次性下载是值得的,因为 SmartGWT 网格在实际使用过程中在减少网络请求方面做得很好:
http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_featured_category
您是否有最终用户需要或可以使用“livegrid”式按需加载、全行可定制的内联编辑、冻结列、动态分组、自适应内联过滤、可扩展行,也许这些功能可以同时组合?那么为了提供更好的应用程序、提高用户的工作效率或销售更多的产品,这是值得的。
只需要一个基本的表格显示?那么是的,这太过分了。
说这是不可能的发帖人实际上是不正确的,该答案应该被否决。
Yes, you can adopt a single widget from SmartGWT, it does have caveats.
As another poster pointed out, you will be loading most of the core SmartClient runtime. You can avoid loading parts of the SmartClient runtime that you do not need by inheriting the SmartGwtNoScript module and including only the underlying SmartClient modules you actually use (basically Core, Foundation, Grids).
This is still going to be a large grid component, so think it through.
Are your users on high speed connections? Then they'll never notice, go for it.
Do they use the application for a while, or use it frequently? Then the one-time download is worth it because the SmartGWT grid does a good job of cutting down on network requests during actual use:
http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_featured_category
Do you have end users that need or could use 'livegrid'-style load on demand, full-row customizable inline editing, frozen columns, dynamic grouping, adaptive inline filtering, expandable rows, maybe some combination of these features all at once? Then it's worth it in order to deliver a better application, make users more productive or sell more product.
Just need a basic table display? Then yes, it's overkill.
The poster that said this is not possible was factually incorrect and that answer should be voted down.
您不能只从 SmartGWT 中选择一个小部件,因为它们依赖于框架的其余部分。 SmartGWT 是一个使用 JSNI 围绕 SmartClient 库的瘦包装器。这是一个不错的库,但您需要全部采用或不采用。
我相信这错过了 GWT 的要点,因为您只是包装了 Javascript,因此如果 Google 添加对其他浏览器的支持,您将无法支持 SmartClient。另外,您会错过代码分割等的所有新好处,因为 JS 库将始终完整下载。不过,您也许可以拆分 GWT 代码。
ExtGWT 是另一种选择。这是一个完整的 Java 实现。它仍然是一种全有或全无的方法,但至少它充分利用了 GWT 编译器。
请务必检查每个许可证,因为我相信 SmartGWT 比 ExtGWT 更自由一些。
GWT 孵化器和GWT Mosaic 项目。这些都是为了与 GWT 紧密结合而编写的。事实上,孵化器中的代码在成熟时可能会进入 GWT。我相信孵化器中有一个很好的表格小部件。
我希望这会有所帮助。
You would not be able to just choose a widget from SmartGWT as they rely on the rest of the framework. SmartGWT is a thin wrapper using JSNI around the SmartClient library. This is a nice library, but you need to adopt it all or none.
I believe this misses the point of GWT as you are just wrapping Javascript, so if Google adds support for another browser, you will not be able to support it SmartClient does. Also, you miss all the new benefits of Code Splitting etc as the JS library will always download in full. You may be able to split the GWT code though.
ExtGWT is another choice. This is a full Java implementation. It's still an all or nothing approach, but at least it does leverage the GWT compiler to the full.
Do make sure you check the licenses of each as I believe the SmartGWT one is a bit more liberal that ExtGWT.
There is always the widgets in the GWT Incubator and GWT Mosaic projects. These are written to be very tightly knitted to GWT. Indeed the code in the Incubator may find its way into GWT when it matures. There is a nice table widget in the Incubator I believe.
I hope this helps a bit.
本质上是的。您还可以考虑 Ext GWT (http://www.extjs.com/products/gxt ),这是同一件事 - 一组围绕 GWT 类的丰富包装器。
Essentially, yes. You may also consider Ext GWT (http://www.extjs.com/products/gxt), which is the same thing - a set of rich wrappers around GWT classes.
是的。您可以使用 smartgwt。但不要将 GWT 和 smartGWT 结合起来。在 GWT 小部件中添加 smartgwt 小部件不太受支持。您也可以尝试高级 GWT。
http://advanced-gwt.sourceforge.net/demo/index.html
Yes.You can use smartgwt.But do not combine GWT and smartGWT.Adding smartgwt widget in GWT widget is not supported very well.You can try Advanced GWT also.
http://advanced-gwt.sourceforge.net/demo/index.html