Wednesday, August 1, 2012

Suggesting a new mode: instant in-place changes of GWT Javascript code?

Dear all,

This is hopefully starting a discussion that results in a GWT feature request. Maybe/probably this was suggested before and is currently in the works or it was rejected -- then I would like to learn about the reasons. 

Ok, here it goes:

We have the 'development mode', which allows us to make changes to the Java code and review while the application while running. Still it is horribly slow, especially for things like graphics where one often prefers to directly use production mode -- even though the compilation step is equally time-consuming. I want to suggest a new 'mode' that fuses the instant code changes of 'development mode' with the speed of 'production mode'. 

The Eclipse Java compiler is able to perform an 'instant and continuous in-place modification' of the Java byte-code while the users edits the Java sources. It does not re-compile everything, just the changed part in a single .class file. I think this concept should be easily transferable to the GWT Javascript compiler. The GWT Javascript compiler doesn't have to be able to modify any kind of JS code in-place -- just the code it generated itself. Maybe one could even 'decorate' the generated JS or split it up in several files to make this atomic in-place modification easier to implement. The in-place modifiable JS does look anything like the JS generated for the GWT 'production mode'. Still, it is valid JS.

Most of a GWT projects code is contained in several unmodifiable jar files. There is only a small amount of Java-source code that can be actively edited. It should be quite easy and performant to build a model that allows in-place modifications of the generated JS in real-time while the user edits the Java sources. A browser refresh could be done at any point since the JS is always up-to-date.


Cheers,
Dieter

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/evmGjdQ5DzwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment