Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

any examples of gwt/java incompatibilities

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

I was wondering what the biggest incompatibility you've seen between java (the JRE and the language) and GWT generated javascript (running in web mode)? The only one I've seen is this:


Which alerts 'no nfe' in gwt web mode, but when compiled into a java class emits 'nfe' (I haven't tested it in hosted mode).

Any other examples of incompatibilities?
 
author
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are very few differences, and actually none come to mind. Part of the allure of GWT is that you can forget sometimes that you are compiling code to JavaScript.

With the specific case you mentioned, I would probably say that this is a bug, not an inconsistency. The GWT compiled code should throw an exception, just like the Java code.

If you go over to the GWT site, there is a link for bug tracking. It might be worth adding.
 
Daniel Moore
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Robert. The good folks at google must have done a killer job on GWT if you spent that much time writing a book and couldn't think of any inconsistencies.

I did end up submitting an issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=1310
 
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Daniel Moore:
Hi folks,
I was wondering what the biggest incompatibility you've seen between java (the JRE and the language) and GWT generated javascript (running in web mode)?



There is a small list of issues that might cause confusion between Java and JavaScript here:

http://code.google.com/webtoolkit/documentation/com.google.gwt.doc.DeveloperGuide.Fundamentals.JavaToJavaScriptCompiler.LanguageSupport.html

But as Rob says it is very few.

//Adam
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!