• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Clarification on GWT

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its really a very basic (and may be weird) question.

When GWT says, it compiles your Java source code into optimized, stand-alone JavaScript files that automatically run on all major browsers, why are we getting some browser compatibility errors that runs on one browser(Mozilla) but not on others(IE). I noticed that many times, getting sick of solving them because its really a different approach as compared to javascript coding at client end.

I would really like to read the book that solves the common problems thus providing us with the best solutions.



 
author
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

You got it right. When compiling the Java code into JavaScript, GWT uses a "deferred binding" process, by which it creates specific, distinct, browser-oriented versions of the code. (That is, the produced code for IE6 if different from the IE8, and from the Firefox one, etc.) GWT also produces a small "loader" application, which checks your browser (and locale, but let's not go into that now) in order to download the version that suits your browser.

In my book, there are several chapters (for example, chapter 4 for browser specific themes, and 15 for compilation) that deal with these matters.

Hope this helps!
 
vedagni tula
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your immediate response, Frederico. So detecting the browser version and locale thru loader app, GWT does produce the code accordingly. Then why this browser compatible errors again? Just curious to know.

Anyways, will check it on your book if it does have any explanation and the solution for this one along with other common problems.

Thanks again.
 
Federico Kereki
author
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In chapter 4 of my book, I used "deferred binding" to show how to recognize different browsers.

I've recently written an article for InformIT (should appear soon) about Multimedia with GWT, and I used the same technique in order to produce code that would run on IE (using <embed> tags) or HTML5 enabled browsers (using <audio> tags instead).

Best regards,
 
I love a good mentalist. And so does this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!