Robert Hanson

author
+ Follow
since May 11, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Robert Hanson

If we had had out way we would had an unlimited time to write an unlimited number of pages about an unlimited number of topics. The publisher pulled us back to something a little more realistic. It is hard to sell a $200 book these days

If I have my way we will have a second book that will cover GWT + Spring, GWT + EJB3, GWT + Struts, GWT + Gears, GWT Animations, and other hot topics.

Would a book like that interest you?

Originally posted by Chris Boldon:
Does this book mostly cover new implementation, or does it also cover legacy implementation?



It doesn't explicitly cover legacy implementation, but I don't know that we could given the number of possibilities. What we do cover is the entire toolkit from soup to nuts. This includes tools like GWT-RPC for integration with Java servers, JSON-RPC for integration with non-Java servers, FormPanel useful for use with Struts, JSNI for integrating with existing JS code, etc.

So even if you are planning on using GWT to spruce up an existing app, I think that the book can still help you achieve that goal.
12 years ago
GWT
GWT compiles to JS, so it doesn't protect you any more than any other JS app.

There is actually a really good and fairly long article on the GWT site addressing this topic. It was authored by one of the members of the GWT team.

http://groups.google.com/group/Google-Web-Toolkit/web/security-for-gwt-applications
12 years ago
GWT
I don't know much about either of those. Taking a quick look at the websites it looks like ThinWire requires a Java server, while GWT does not.

I wouldn't want to speculate on any other differences without taking the two you mentioned for a test drive.
12 years ago
GWT
All you need to do is change out the GWT jars. The GWT 1.4 loading mechanism has changed, but it is still backwards compatible with the 1.3 loading style (using the module meta tag).

In most cases this will be enough... but you may find that there were some API changes that affect you. In general though the API changes are minor, and easy to fix.

I suggest just trying it and see if it works.
The ToC and two sample chapters can be found on the Manning site, http://manning.com/hanson/. Take a look at the sample chapters, they will give you an idea as to the number of examples.

We tried to keep the examples short and on-topic. The last thing we want you to do is to wade through three pages of listings without an explanation.

You should also visit the GWT Dashboard, this is the app that we build throughout the book. We wanted to build a real app in the book, one that you could play with.
12 years ago
GWT

I want to know that can we use GWT with java web applications or it is totally different technology?



GWT focuses on the client-side, and all code on the client-side is compiled to JS. The only interaction with server-side resources would be through RPC calls. With GWT you get a few tools to help with that...

* RequestBuilder - REST style call, just like you would with Prototype, or other AJAX framework.

* XML-RPC - Specific to GWT this allows you to pass Java objects between the client and a server-side servlet. It automatically handles the object serialization.

* JSON - A JavaScript Object Notation parser and objects are included. This can be used with RequestBuilder to send the JSON request/response to any server type that uses JSON (Perl, RUby, PHP, etc.)

* XML Parser - The XML parser that comes with GWT can be used to parse incoming requests fetched with RequestBuilder. There is a third-party library that used this to create a XML-RPC library.

Hope that helps.
12 years ago
GWT
With FormPanel you have the option of not using the hidden frame. You could have the results go to a named frame, like "_self", which would replace the contents of the page.
12 years ago
GWT
GWT can be used in any app that would normally use JS code. I like to consider the size of the project when determining what to use. For large projects, even a few hundred lines, I prefer GWT for the ease of use and code compression.
There are very few differences, and actually none come to mind. Part of the allure of GWT is that you can forget sometimes that you are compiling code to JavaScript.

With the specific case you mentioned, I would probably say that this is a bug, not an inconsistency. The GWT compiled code should throw an exception, just like the Java code.

If you go over to the GWT site, there is a link for bug tracking. It might be worth adding.
12 years ago
GWT
Hi J. B.,

I am a believer in TDD, but as a practitioner I tend to slip sometimes. When it comes to GWT I tend to slip more than usual. ...But I am working on it.

As for test-driving, I assume you mean the JUnit support in GWT? I will say that it isn't as smooth a ride as I would like. First you need to use only those classes that you can use in a normal GWT app (read limited JRE and Java 1.4 syntax), because the test case, like the GWT app code, will be compiled to JS for testing. Second there is no support for suites.

On the flip side, the one thing I really like about it is the ability to test the RPC calls between the client and server. When running the tests GWT starts up a light-weight Tomcat instance for your server-side code, then in the test you can call your client code to trigger AJAX-style RPC calls against the server. I don't know of any JS tool that will let you do that.

I think that the JUnit support is great, but it could be better.
12 years ago
GWT
If you suspect a JS problem you can compile the GWT code with the -pretty or -detailed (pretty plus some more) style switch. The resulting JS code will be a lot larger, but the method names in the JS will reflect the original Java class/method names.
12 years ago
GWT
At the top of my wish list is built-in effects support, similar to Scriptaculous.

The benefit of native GWT effects over Scriptaculous is that the GWT compiler can optimize the size and to provide the same functionality with smaller JS files.

There are already a couple of draft implementations floating around, including one from Adam.
12 years ago
GWT
Hmmm... no, no support for NS 4. I am pretty sure that NS 4 won't support the XMLHttpRequest object for performing RPC, so it likely wouldn't be a very good AJAX type platform.
12 years ago
GWT
Hi Filippo.

From your experience is it practical to integrate Javascript code within the Java one?



Yes. Check out the GWT Widget Library. It contains wrapper classes for Scriptaculous, JsGraphics, JsCalendar, etc. These are just JSNI wrappers around JS code.

These are really great JS libraries. Using JSNI allows you to take advantage of that and not have to reinvent the wheel.

Do you think is well covered this topic in the book?



Yes. JSNI sounds complicated, but it is pretty simple. In the book we cover the special JSNI syntax, and show you how to use it.

Can I ask you if in your experience using a the java-to-javascript compiler you really stop thinking about the underlying Javascript?



There is a compiler?

It took me about two weeks to get used to it, and now I don't even think about it. I just write my code in Java, compile, and deploy. I don't look at the generated code at all.
12 years ago
GWT