File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GWT and JQuery / Web Framework

 
Luke Murphy
Ranch Hand
Posts: 300
  • 0
  • 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.
 
Maneesh Godbole
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • 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
  • 0
  • 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
Saloon Keeper
Posts: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whats the point in having Ajax if you change the page?
 
Jait Thomas
Greenhorn
Posts: 13
  • 0
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic