Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

GWT and JQuery / Web Framework

 
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
GWT looks pretty impressive. I am just wondering how you would have an architecture that uses:

1. GWT and another JS library such as JQuery. The philosophy of GWT seems to be that you write in Java, GWT generates JScript. This seems to not encourage using other JS libraries such as JQuery? Because they are tightly coupled with JS paradigm, GWT tries to hide it.

Correct?

2. Similar question for web frameworks. I get the whole idea of GWT generating optimised JScript.

However, it doesn't offer things like page navigation that you'd get with JSF, Spring MVC 3.0.

Is it is easy / hard to use GWT in an JSF or Spring MVC architecture?

Thanks.
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Check out gwtquery
2) GWT apps are typically "one page". You can think of it as a stand alone application where the "shell" remains the same, but the data/UI changes based on some event or user activity. However, if your requirement mandates different URLs, you can make use of the History mechanism. More on it here http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's interesting what you say about the one page model. Which approach do you prefer and why?

Cheers

 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the point in having Ajax if you change the page?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Other than gquery, jquery can be integrated with gwt using JSNI. If you have to use some jquery plugin, you need to have your own same implementation in gquery. By using JSNI, you can directly call Jquery methods. However JSNI should be used only as last resort.

Checkout PlaceRequest in GWT for navigation, its mostly event based.
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!