What is the advantage of GWT 3.0?

311 views
Skip to first unread message

Andrew Buck

unread,
Jun 1, 2019, 10:59:27 PM6/1/19
to GWT Users
I love GWT 2.8 and I appreciate all the work that the community has put into it as well as the work towards GWT 3.0. I'm trying to understand what the advantage of GWT 3.0 is though. It seems like GWT 3.0 is a subset of GWT 2.8 with a different compiler under the covers. How is the closure compiler better than the GWT 2 compiler and is it really worth trying to switch when GWT 2.8 is mature and works well?

Peter Donald

unread,
Jun 2, 2019, 6:44:23 PM6/2/19
to GWT Mailing List
On Sun, Jun 2, 2019 at 12:59 PM Andrew Buck <anb...@gmail.com> wrote:
I love GWT 2.8 and I appreciate all the work that the community has put into it as well as the work towards GWT 3.0. I'm trying to understand what the advantage of GWT 3.0 is though. It seems like GWT 3.0 is a subset of GWT 2.8 with a different compiler under the covers. How is the closure compiler better than the GWT 2 compiler and is it really worth trying to switch when GWT 2.8 is mature and works well?

The reason we are moving that way is:

* <1s refresh times in dev mode regardless of the size of the project. The promise is that the compile time is proportional to the size of the change, not the size of the app.
* Integration with modern javascript so can use modern browser facilities without backflips. i.e. Simple creation of ES6 class instances so can do things like WebComponents without ugly hacks and/or loss of optimize-ability.
* Potential for much better code optimization and writing custom compiler passes.
* Emitting modules as non-web apps without writing custom linkers. i.e. Currently if you are building a browser extension or a web worker or an app to run in node you need to write a custom linker
* potential for hot-reload in candidate modules without loosing any application state (i.e reload just a single ui component in our react/gwt app without loosing the rest of the state in our application)
* Integration/optimization with native javascript. i.e. Bringing in native js modules will be possible and they will all be compiled and optimized together
* Exporting java libraries to native Typescript/javascript without any ugliness and full optimization still available

To be honest the first two are the main reasons ... the rest is icing on the cake ;)

-- 
Cheers,

Peter Donald

Andrew Buck

unread,
Jun 3, 2019, 11:17:36 AM6/3/19
to GWT Users
Sounds great! Thanks!
Reply all
Reply to author
Forward
0 new messages