Starting new GWT project - what to use

543 views
Skip to first unread message

Bryan Buchanan

unread,
Mar 27, 2017, 12:55:27 AM3/27/17
to GWT Users
Hi,

I've been a long time GWT user, and my current apps use gwtbootstrap, UI Binder, widgets, GWT-RPC. i.e. most of the stuff that, IMO, makes GWT worth using.

From the stuff I've seen about the 3.x release, a lot of this disappears. I'm wondering if there's any document anywhere which sets out "best practice" for any new GWT deleopment (or indeed, would you even use GWT ?).

Thanks.

Frank

unread,
Mar 27, 2017, 4:09:32 AM3/27/17
to GWT Users
I am just ignoring all talks about GWT3.
Nobody really knows what will go away. And the talk about it is going on for almost 3 years.
I decided I will fix stuff when GWT3 is actually released and I know for sure what will go away.

I don't use UIBinder and never used it. And I don't use GWT-RPC because I talk to a non java rest service. But also using widgets and gwt-gootstrap3.

Op maandag 27 maart 2017 06:55:27 UTC+2 schreef Bryan Buchanan:

David

unread,
Mar 27, 2017, 5:21:32 AM3/27/17
to GWT Users
Bryan,

We don't know enough of GWT 3.0 to be 100% certain. As a consequence I'm just trying to be as pragmatic as possible. 
 
What I am currently doing is this:
- UiBinder with elemental2
- celltable/datagrid
- JsInterop to interact with JQuery/Bootstrap/D3 and some other components for JQuery. Writing the JsInterop was really easy.
- GWTP for MVP design to keep my tests fast and independent of the UI layer
- Using restygwt with gwtjackson for RPC.

The UiBinder dependency will be a problem with GWT 3.x but right now I did not find something that really was 100% my taste (Errai comes close, but I don't like going full Errai). Migrating the templates should not be too hard since the html files are mostly pure HTML tags anyway.

My exposure the celltable/datagrid is hidden behind a builder pattern and the column model is generated using a custom generator. I'm considering moving to either a pure JS table implementation or the Vaadin grid component. But there is no rush at this moment.


--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Paul Stockley

unread,
Mar 27, 2017, 11:23:15 AM3/27/17
to GWT Users
I would seriously look into using some kind of Virtual DOM based library e.g. React, Preact or Vue. I have been using react for over a year both in Java and Javascript and I never want to go back to the old imperative approach. Even complex UI code is now relatively easy to comprehend. I made GWTReact so we could integrate React into our existing code base. However, it would be a good choice for a new project if you want to stick with GWT. Once elemental 2 is released I can remove any dependency on the old GWT code base.

I also use javascript + flow types for some of our newer projects. This works pretty well in intellij with the flow plugin. I don't mind either approach. 

Bryan Buchanan

unread,
Mar 30, 2017, 3:18:37 AM3/30/17
to GWT Users
Just watched some of the videos from GWTCon2016 - well worth watching and give a much clearer view (to me) of where it's all heading.

maticpetek

unread,
Apr 3, 2017, 2:26:53 AM4/3/17
to GWT Users
Hi,
  We have the some situation in our company. Long time GWT user and now we get two new projects. For one project we will use errai + gwt material design. And for other Vaddin.  

Thomas

unread,
Apr 3, 2017, 8:28:26 AM4/3/17
to GWT Users
David, could you point me to some examples of "UiBinder with elemental2" ? Quite curious but can't find too (m)any examples via Google.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.

David

unread,
Apr 4, 2017, 3:22:22 AM4/4/17
to google-we...@googlegroups.com
Thomas,

I can't point you to any example on the internet. I am not allowed to post my code online.
But is is actually quite simple. I just use UiBinder and inside plain html tags inside an HTMLPanel.

Something like this:
<ui:uiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:g="urn:import:com.google.gwt.user.client.ui">
  <g:HTMLPanel>
    <h1 ui:field="pageTitle"/>
    <input ui:field="textbox"/>
  </g:HTMLPanel>
</ui:uiBinder>

In the UiBinder class you can just do:
@UiField
HTMLElement pageTitle;

@UiField
HTMLInputElement textbox;

and it will be properly filled in. From there you can just use the Elemental2 API.

I guess you could even skip the HTMLPanel and use a pure HTML approach but in my case I still have to mix widgets with pure HTML because I am depending on celltables (which we customized and extended a lot). But I am looking at replacing them with a JS table implementation.

To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-tool...@googlegroups.com.

Thomas

unread,
Apr 4, 2017, 4:24:47 AM4/4/17
to GWT Users
Thanks for that info David. Quite simple indeed. We are currently relying on a lot of widgets, but we've got a similar pattern already using com.google.gwt.dom.client.* elements in UiBinder.

That helps alot!
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages