I am using GWT. GWT is based on XMLHttpRequest. what is XMLHttpRequest and how GWT works?
XMLHttpRequest
Thanks!
It is a very wide question.
It might be helpful if you read about Ajax first.
How GWT Works
If I want to describe it very simple, we can say its a javascript object which transfers requests between browser and remote server without reloading entire webpage. It's internal implementation is browser native, but its known as heart of any AJAX (Asynchronous Javascript And Xml) based technology such as GWT, jQuery and other similar frameworks.
See this link for more information.
Related
I need implement a system with multithreat in GWT.
What is the best way to do this???
I am using http request, json
and web service building in php
Thanks
GWT code is translated to JavaScript which is not multithreaded (or at least, not in a way accessible to the user).
There are ways to program around tasks and callbacks in GWT. Take a look at the Scheduler class.
I want to develop a Web Application by combining Spring Framework, GWT, Servlets, JSP........
I plan to develop Server side using Spring,Servlet ,JSP....
And for Client side, GWT....
The Output page(Response page) of my Application, will given by JSP only....
Then what is the use of GWT at client side....
please clear my doubt....
Read the following
1) AJAX - http://en.wikipedia.org/wiki/Ajax_(programming)
2) RIA - http://en.wikipedia.org/wiki/Rich_Internet_application
3) GWT - http://en.wikipedia.org/wiki/Google_Web_Toolkit
The problem with using purely jsp to create a web application is that each user interaction typically requires the entire page to be reloaded. Depending on what you're doing this approach is considered outdated. GWT is built on top of javascript and xhttp requests, allowing user interactions to affect only relevant portions of the page. This generally results in a faster and smoother user experience.
If you have already decided that you want to use JSP, then you don't need GWT. Although you could use it to create custom dynamic components and embed them on your page. Or to create a part of your application where you find JSP not sufficient (which would be probably a part that should be more 'dynamic' and would require a lot of javascript).
http://code.google.com/webtoolkit/overview.html#how
Does GWT app are indexed by search engines???? if yes, how to accomplish that?
Thanks.
GWT apps and more generally ajax can't be fully indexed by search engines... yet. But work is being done to make ajax applications crawlable. The most common alternative used by developers to get their gwt app referenced is to publish an html version.
Search engines don't prefer html that generated on client side by javascript(Ajax). They prefer static html that generated from server side. That is why, AJAX applications are difficult to index because they are generated dynamically on the client side.
Anyone know of any tutorials implemented across multiple web application frameworks?
For example, I'm starting to implement GWT's Stock Watcher tutorial in Turbo Gears 2 to see how difficult it will be to do in Turbo Gears 2.
Likewise, I'll be looking for a Turbo Gears 2 tutorial to implement in GWT.
But I hate to re-create the wheel - so I was wondering if anyone was familiar with such projects and/or would be interested in helping me work on such a project.
Thanks,
--Spencer
While it is possible to combine the two frameworks, I hope to convince you not to do so.
Most web-frameworks, including Turbogears, have server-side page flow management. A page is served to the user by generating html, user interacts by clicking on links or by posting a form, the browser sends a fresh request to the server, and finally server responds with new html altogether. You AJAX'ify the page by using a js library, or the framework has some support. But, in general, transition from one view to another is done on the server side.
GWT is totally different. There is only a single HTML page in the system. Once this page is downloaded, everything happens on the browser through javascript. When the user clicks on a link, its essentially just a javascript function call. History management is done through fragment urls (the portion after the #).
These two philosophies are poles apart. So apart that I daresay GWT doesn't work well with any server-side web technology. See this discussion on GWT vis-a-vis JBPM/Struts/Spring Webflow. And see this discussion on GWT v/s JQuery.
I've got a GWT application, which periodically needs to update the screen with new tick items as they come in. We also have messages published by a CometD/Bayeux server (for a different AJAX application) and I'd like to consume them in my GWT.
Of course, I can drop into JavaScript, hook up Dojo, and receive callbacks in the JavaScript layer - and from there, route a call into GWT Java code via a JSNI - but there doesn't appear to be any support in GWT directly for using long push or async calls other than the non-RESTful RPC.
How have you integrated GWT and Bayeux?
Since this question was originally posted there have been a few advances:
http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ
http://code.google.com/p/gwteventservice/
http://code.google.com/p/gwt-comet/
JSNI is not that bad option as it might sound first. There is a DZone refcardz 'GWT: Style, Configuration and JSNI Reference' which I have found helpful.