SmartGWT with GWT?

旧街凉风 提交于 2019-12-09 01:24:28

问题


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


回答1:


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.




回答2:


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.

  1. Are your users on high speed connections? Then they'll never notice, go for it.

  2. 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

  3. 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.

  4. 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.




回答3:


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.




回答4:


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



来源:https://stackoverflow.com/questions/1915374/smartgwt-with-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!