Not to belittle your observation, but replace "Javascript" with "object
code" and "Java" with "C".
It's a good question - how much do you trust your compiler? As a
profession, we've apparently dealt with this issue in the past:
One thing we do is to disable optimizations. GWT has a compiler mode for
that. However, it produces more code, and one aspect of GWT is to reduce
code bloat. Most real-world compilers have similar a trade-off.
Another thing we do is instrument our code. For example, GWT supports
the java.util.logger framework.
We also employ test-driven development. There is the GWTTest environment
as well as other, superb test frameworks.
> Has this been a problem for folks? Is there some other concern we
> should be aware of?
I'd suggest, if your group hasn't done so, that you create a
proof-of-concept, deploy it to a select group of blind men, and ask them
to describe the resulting Elephant.
Bueno Suerte,
jec
@Samyem -- Good point about the async RPC...we also had that issue
when debugging and/or integration testing Flex/Actionscript.
@Jeff -- Your metaphore is correct...to continue it, I'd say I trust
my Java/C++/C# compilers a lot. My concern is exactly whether or not
the GWT compiler has issues. Do you disable optimizations during
development or is that for production code too?
@Thomas - Sourcemap is incredible if it works as advertised....is
that how Eclipse keeps the Java debugger "in sync" with the browser
Javascript execution?
I want as little code sent to the client on startup as possible, so I
only disable when there's a problem. Actually, I do not disable
optimization, I recompile with the -STYLE DETAILED argument. This
provides enough detail to work through the behavior with FireBug or
whatever IE provides.
My experience is that I inevitably get bit when I don't test on at least
three different browsers. I usually use the set (Safari, IE, FF). Also,
I don't support IE 6, which decision might not be an option for you.
This technique is separate from the -OPTIMZE, -EA, and -DRAFTCOMPILE
arguments. I haven't seen any issues with optimization.
> @Thomas - Sourcemap is incredible if it works as advertised....is
> that how Eclipse keeps the Java debugger "in sync" with the browser
> Javascript execution?
>
> Thanks everyone for your answers.
Thanks for continuing the conversation,
jec
>
> Dave
>
>
>
> On Nov 12, 4:52 am, Thomas Broyer <t.bro...@gmail.com> wrote:
>> Most of the time, you'll be debugging in DevMode, against your Java code,
>> within your Java IDE, using any Java debugger.
>>
>> GWT 2.5 will generate SourceMaps so you can see your Java code in your
>> browser's dev tools, set breakpoints in the Java code to pause the JS
>> engine, etc.
>> Seehttps://plus.google.com/110412141990454266397/posts/iqXo5AyHkydandhttp://www.2ality.com/2011/07/firefox-sourcemap.html
>>
>> In the mean time, or in browsers where SourceMaps aren't supported, GWT
>> generates symbolMaps that allow you to find where an obfuscated function
>> name comes from in your Java code. It can also be used to automatically
>> deobfuscate stack traces (so you can, for instance, send a client-side
>> exception to the server for logging �using java.util.logging and the
>> SimpleRemoteLogHandler or RequestFactoryLogHandler�, and have the