Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GWT ... Platform and browser compliance?

 
Karl Krasnowsky
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same way that JavaScript libraries such as jQuery do it: provide a common API that hides the browser differences.
 
Karl Krasnowsky
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic