aspose file tools*
The moose likes GWT and the fly likes GWT ... Platform and browser compliance? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT ... Platform and browser compliance?" Watch "GWT ... Platform and browser compliance?" New topic
Author

GWT ... Platform and browser compliance?

Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Hello,
I've been looking at web development tools such as Flex and as of recent, GWT.
So far I'm relatively impressed by the Flex3 model. It makes sense to me that using a controlled environment within the context of the browser can potentially waylay the issues that often times becomes the majority of time spent when debugging browser based client side UI code. While using JavaScript is an option, it's been my experience that you are at the whim of the Browser, its version, and sometimes the OS at how well the UI will conform to the JS code and necessitates testing and modifying to a wide variety of configurations. And in many cases, the removal of some of the more interesting wigets (or conditionally working around them) is necessary.

This is why the idea of GWT doesn't sound like a good direction to me. I've seen references that claim that GWT will compile the javascript code in a manner to achieve browser rendering neutrality, but how? I would think the same issues of writing native javascript based pages would apply under GWT as well? I like the idea of being able to code my UIs in the same language that I do the majority of my coding (Java) but maybe I'm missing something fundamental here. How can GWT buffer the blow in this respect?

thanks,
Karl


[SCJP 6]
[SCBCD in process]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

The same way that JavaScript libraries such as jQuery do it: provide a common API that hides the browser differences.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Bear Bibeault wrote:The same way that JavaScript libraries such as jQuery do it: provide a common API that hides the browser differences.

Bear,
So is this accomplished by routing through a different runtime library specific to the browser or simply adding the conditional scripting scratch to work around differences when compiled?
From my understanding of how GWT works, it takes the GWT Java code and "compiles" it into the JS equivalent page code. Or is there more to it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

The generated JavaScript will take into account any browser differences, just like jQuery/Dojo/Prototype code does, for the supported browsers. It's not rocket science -- it's a well-known and well-defined problem.
Karl Krasnowsky
Ranch Hand

Joined: Jan 16, 2009
Posts: 97
Bear Bibeault wrote:it's a well-known and well-defined problem.

Maybe so, but wouldn't it be a better model to encapsulate such differences through the use of a runtime library (as does Flex) in the case that either browser related bugs arose and/or new functionality was added? In GWT and like models it would seem that a regeneration of JS against an upgraded sdk would be necessary and regression tests and other safeguards to insure reliable code. I'm not a huge Adobe fan by any means, but their approach makes more sense to me.
 
 
subject: GWT ... Platform and browser compliance?