• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

gwt - effects of design

 
author & internet detective
Posts: 40169
812
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GWT takes a different approach to AJAX than other frameworks. I'm curious what the authors and others think of the effects of these.

1) Since the JavaScript is generated from Java, it reminds me a bit of servlets. Does this mean the presentation (HTML) in Java rather than just the JavaScript?
2) There is a different JavaScript file generated for each browser. Does this mean you have to redeploy when the next version of each browser comes out?
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:

1) Since the JavaScript is generated from Java, it reminds me a bit of servlets. Does this mean the presentation (HTML) in Java rather than just the JavaScript?



There is no Java in the presentation layer (as there would be with applets, not servlets).


2) There is a different JavaScript file generated for each browser. Does this mean you have to redeploy when the next version of each browser comes out?



There is one Javascript file for all browsers. You may want to redeploy if the GWT is updated or a browser's Javascript engine changes (as you would do anyway).

Cheers,
Glenn
 
author
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Jeanne Boyarsky:

1) Since the JavaScript is generated from Java, it reminds me a bit of servlets. Does this mean the presentation (HTML) in Java rather than just the JavaScript?



Actually the Java is only used during the development phase, once you hit the compile button the result is pure JavaScript that manipulated the DOM and makes use of CSS for styling.


Originally posted by Jeanne Boyarsky:

2) There is a different JavaScript file generated for each browser. Does this mean you have to redeploy when the next version of each browser comes out?



It mostly depends on what the next version of the browser does to its underlying handling of the DOM.

If it is the same as the previous version then No, if it changes, then first someone will have to implement the necessary GWT DOM classes and then Yes, you would have to recompile and redeploy.

This makes it slightly different to other approaches where you might just link to a new JavaScript library, but compiling and redeploying is not a substantial amount of effort compared to the test phase you would go through (with both a GWT and a non GWT approach) to ensure your application still works in a new browser.

//Adam
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic