No Polyglotting: First Experience with GWT Boot
Check out this hesitant developer's experience with using GWT Boot, and his reason behind why it makes Polyglotting unnecessary.
Join the DZone community and get the full member experience.Join For Free
In this week I carried out a training for seven internal Java developers, who are good at Java but don't really have a real training in GWT yet. Within two days I managed to get through following slides:
- Introduction to GWT
- Your first GWT App
- UI Frameworks for GWT
- Dependency Injection with Gin and Dagger2
This is also the first time that I could use GWT Boot to be able to let them do their exercises and tasks. GWT Boot Starters are a set of convenient dependency descriptors that you can include in your application. You get a one-stop shop for all the GWT and related technologies that you need without having to hunt through sample code and copy paste loads of dependency descriptors. GWT Boot Starters are similar to Spring Boot Starters. Here are what I found using GWT Boot so far:
- To show the developers how to create an example project with Maven and GWT Boot Starters is quite easy for me. The pom.xml is very short, and very easy to understand and extend. There's no need to copy & paste a lot of Maven dependencies in their pom.xml project.
- The idea of generating the real GWT module file from module.gwt.xml is a bit difficult to understand. But this is not a show stopper.
- The start would be a lot easier if I could offer them something like Spring Boot Initializr. It is definitely a must to also offer GWT Boot Initializr for GWT community.
All in all, it is great to have GWT Boot Starters. It is definitely easier for Java developers to start their own GWT project with their chosen UI framework, as you have a lot of choices for UI frameworks in the GWT environment.
The second thing which is actually always a disadvantage of GWT — at least I always thought it was — is the documentation. The documentation of GWT is actually really good, especially the "core" functionalities of GWT. I could find every single core aspects in GWT easily:
- Compiler / transpiler
- Emulated Java Runtime
- Development artifacts:
- HTML host pages
- Standard directory and package layout
- GWT modules: units of configuration
I have to admit that the documentation of tools and UI component frameworks is not good. But as I only use GWT Boot, everything is quite simple. No need to install a plugin, just Maven. So the one page below is the only tools I need to develop with GWT productively.
What was most interesting to hear from the Java developers is what kind of UI component frameworks are interesting for them and easy to understand for them. Here are the categories of UI component frameworks which can be used in GWT:
- Widget-based (Standard GWT, GWTBootstrap3, GWTMaterialDesign, ...)
- Elemental2-based (DominoUI, Elemento, VueGWT, GWTReact, React4Java, ...)
- Canvas-based (I only show the idea and an example: Animatron)
Almost all of them like the idea of widget-based components, and from Elemental2-based components, they prefer Elemento and DominoUI, which is also based on Elemento. One developer who already knows React could not directly understand the idea of GWTReact and VueGWT. All the other Java developers are not fond of the idea of working with VueGWT and GWTReact. It seems that the basic idea of VueGWT and GWTReact is too different in comparison with Java UI components frameworks like Swing or JSF.
I still have one day in the training in which I will talk about advanced topics like:
- Client/Server Communication
- GWT Architectural Patterns
- GWT Best Practices
Opinions expressed by DZone contributors are their own.