How to use Super Dev Mode

2,011 views
Skip to first unread message

Johannes Barop

unread,
Jun 23, 2012, 5:25:46 AM6/23/12
to google-we...@googlegroups.com
Hi,

I'm trying to get a simple Application with the Super Dev Mode from trunk running. While I can get the CodeServer to run, I'm unsure how to start my Application with it.

My first problem is that the CodeServer doesn't seem not to serve any static files from the "war" directory. This might be just the bootstrap HTML file but may be other needed external dependencies. Is this a bug or should I use another web server for static dependencies (jetty) which proxies to the CodeServer when it comes to loading the module?

For now
I've placed a bootstrap HTML file in the module's public folder in order to being able to start the application. I can load my module and the "Dev Mode on" works but if I change the source code and recompile the module with the "Dev Mode On" I'm not getting any changes.

I dunno if I'm doing something completely wrong and would appreciate some help :-)


Cheers,
Johannes

Jens

unread,
Jun 23, 2012, 7:30:13 AM6/23/12
to google-we...@googlegroups.com
I think currently the codeserver only serves the compiled JavaScript of your app. So you still have to use a server that serves your server side code.

Thats what I do:

1.) create a new module.gwt.xml that inherits your main app and adds the xsiframe linker and sets the devModeRedirectEnabled property (see: http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/hello/src/com/google/gwt/sample/hello/Hello.gwt.xml?spec=svn11016&r=11016)

2.) Start code server with that new module

3.) copy your apps host html page and modify it to point to the bootstrap file provided by the code server. So instead of <script src="app/app.nocache.js"> you now have <script src="http://host:port/app/app.nocache.js">. Thats why you need a different linker in your module.gwt.xml.

4.) Deploy your gwt app like always, e.g. starting the normal dev mode to use embedded jetty or deploy it using an external server.

5.) Open your deployed host html page in the browser and it should load the compiled app from the SuperDevMode code server. If you have started the normal dev mode to use embedded jetty as server you would omit the gwt.codeserver GET parameter when loading the host html page.


-- J.

Johannes Barop

unread,
Jun 23, 2012, 6:10:26 PM6/23/12
to google-we...@googlegroups.com
I'm still  having troubles to see any changes.

1.) The App is loaded through the CodeServer
2.) I change something in the code.
3.) I recompile the module by hitting "Dev Mode on"
4.) I reload the page

--> I do not see the changes I did to the source.

--
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/-/9oYq7mW0Er8J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Brian Slesinsky

unread,
Jun 27, 2012, 6:37:42 PM6/27/12
to google-we...@googlegroups.com
If your source code gets compiled to a jar on the code server's classpath, the code server likely won't see any changes. We normally use the -src argument to point to the source directory where the files are that you're editing, so I know that part works. I'm not sure about changes to things on the classpath.

- Brian

Paul Robinson

unread,
Jul 2, 2012, 4:41:59 AM7/2/12
to google-we...@googlegroups.com
On 23/06/12 12:30, Jens wrote:
> I think currently the codeserver only serves the compiled JavaScript of your app. So you still have to use a server that serves your server side code.
No, it serves source too. As Brian said, use -src arguments to the code server.

> 3.) copy your apps host html page and modify it to point to the bootstrap file provided by the code server. So instead of <script src="app/app.nocache.js"> you now have <script src="http://host:port/app/app.nocache.js">. Thats why you need a different linker in your module.gwt.xml.
You don't need to do this. The Dev Mode On bookmarklet does this for you.

Paul

Constantino

unread,
Sep 4, 2014, 11:52:21 AM9/4/14
to google-we...@googlegroups.com
Regarding point #3, "Dev Mode On" bookmarklet will only do anything if you already have the file "app/app.nocache.js".

If you don't want to compile the application once to get this file generated, the easiest way is to really replace this manually.

I think it would be a good idea to enhance this mechanism so we don't even need that file generated.

Thomas Broyer

unread,
Sep 4, 2014, 12:45:04 PM9/4/14
to google-we...@googlegroups.com


On Thursday, September 4, 2014 5:52:21 PM UTC+2, Constantino wrote:
Regarding point #3, "Dev Mode On" bookmarklet will only do anything if you already have the file "app/app.nocache.js".

If you don't want to compile the application once to get this file generated, the easiest way is to really replace this manually.

I think it would be a good idea to enhance this mechanism so we don't even need that file generated.


Also, in 2.7, DevMode with the new "superDevMode" flag generates such a stub nocache.js. 

Seamus McMorrow

unread,
Sep 10, 2014, 6:45:16 AM9/10/14
to google-we...@googlegroups.com
Guys, 

I am very interested in: 
"I think it would be a good idea to enhance this mechanism so we don't even need that file generated."

I have a multi maven project with about 10 gwt modules, and 3 web applications are built from varying parts of these modules.
What really is our biggest pain point is that we have to generate this file, so we have to do a full build to generate this one file for SDM. This is quite annoying as our build takes about 5 mins even with gwt .

Is there any change that issue 8876 will be resolved before 2.7 official is released. 
Reply all
Reply to author
Forward
0 new messages