| Author |
GWT and JQuery / Web Framework
|
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 299
|
|
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
Joined: Jul 26, 2007
Posts: 8441
|
|
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
|
[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
|
 |
Luke Murphy
Ranch Hand
Joined: May 12, 2010
Posts: 299
|
|
That's interesting what you say about the one page model. Which approach do you prefer and why?
Cheers
|
 |
Maneesh Godbole
Saloon Keeper
Joined: Jul 26, 2007
Posts: 8441
|
|
|
Whats the point in having Ajax if you change the page?
|
 |
Jait Thomas
Greenhorn
Joined: Feb 01, 2001
Posts: 13
|
|
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.
|
Jait Thomas
SCJP 1.2, SCWCD, SCDJWS 1.4 & 5, SCBCD 5
|
 |
 |
|
|
subject: GWT and JQuery / Web Framework
|
|
|