How to create a development/debug and production setup

10 views
Skip to first unread message

Supercobra Thatbytes

unread,
Nov 16, 2009, 5:09:13 PM11/16/09
to Google Web Toolkit
Hello there,

I recently deployed inadvertently a debug version of our game typrX
(typing races at www.typrx.com - try it it's fun).

It was quickly corrected but I know it may happen again. After digging
on Google I found some info how to create 2 different profiles, one
for development mode that has the debug functions and one used for
deployment. Here is what I found from a Google IO presentation. Does
anyone have this setup? Can someone explains how to run this?

MyAppCommon.gwt.xml
<module>
...
<define-property values="debug, release" name="app.config" />
<replace-with class="myapp.debug.DebugConsole">
<when-type-is class="myapp.Console" />
<when-property-is name="app.config" value="debug" />
</replace-with>
...
</module>
MyAppDebug.gwt.xml
<module>
...
<set-property name="app.config" value="debug" />
</module>

Sripathi Krishnan

unread,
Nov 16, 2009, 11:24:14 PM11/16/09
to google-we...@googlegroups.com
Can someone explains how to run this?

Read about deferred binding in the GWT documentation. It will explain the underlying concepts.

Here is what you have to do -
  1. Your debug class and production class must inherit from a common class.
  2. Based on the property (app.config in this case), you choose the correct implementation (debug v/s production)
  3. By default, in your Module.gwt.xml - set the property to production.
  4. Create a new DebugModule.gwt.xml that extends your Module.gwt.xml - and overrides the app.config property to debug.
  5. In your ant script - gwtc compile either Module.gwt.xml or DebugModule.gwt.xml based on a suitable condition.
--Sri


2009/11/17 Supercobra Thatbytes <super...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
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=.



Reply all
Reply to author
Forward
0 new messages