672329 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 11 Messages: 11 Messages: 11 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

Tech Talk: Bruce Johnson on Google Web Toolkit

Posted by: Joseph Ottinger on December 12, 2006 DIGG
In this Tech Talk, filmed at The Ajax Experience in Boston, Bruce Johnson discusses what you can expect when you build your web app with GWT. Bruce also talks about using GWT with existing JavaScript libraries, testing, and profiling, as well as addressing how much of your application should be written with GWT.
What kind of application is GWT meant for?

Bruce Johnson: Well, it excels at applications that have fairly rich client-side state. Although we have taken a lot of care to make sure that it was sort of pay-as-you-go. In other words, if you only use a little bit of functionality, then your script should be relatively small. If you use more functionality, it should be larger, but it should only get larger in proportion to what you actually use. We wanted you to be able to seriously consider adding a little bit of GWT to an existing web application.

So, there is not a requirement to download some, 500K JavaScript library for example. If you only use a little bit of GWT functionality, only a little bit of JavaScript is downloaded, but that said, it really starts to excel when you can build leverage client-side state, when you can keep objects around in the client, and manipulate your application over time without having to do round trips to the server, without having a complex session state on the server that has to be saved to a database and so on. All that state is retained as live objects within the browser as you would expect just like programming a traditional client/server application.
On testing:
We wanted to bring software engineering practices to the world of AJAX as much as we could. So, JUnit support has become a big part of the Java culture, development culture. So, our thought was that we should support using JUnit style test cases. So, there is a test case called GWTTestCase, and if you can create a test case that extends that, then it can automatically run within a JUnit test furnace. Actually it runs in two modes, which is interesting. So, to run as bytecode, normally, like it is very much the JUnit analog of hosted mode. So, you actually can debug your test cases, you can step through them, you can figure out what is going on if you are doing test-driven development. It is important for your test not only just to sort of run in batch mode, but you often want to be able to step through the tests one line at a time. So, there is a hosted mode version of our JUnit integration support, which works well.

And then, my favorite feature is that there is also a webbed version. So, web mode is what we call it when you deploy your application as JavaScript. There is a web setting, basically flagged to the JUnit test runner that will actually cross-compile your application, your test case, I should say, and deploy it to a browser, and then still it will execute your test and use RPC to report back the results to the test runner. So, from your perspective as the guy running the test, it looks as if it is just another test runner instance, but actually what is happening is a lot more interesting underneath the scene. It actually cross-compiles and deploys and runs it in the real environment that you would deploy your application code in. And then, there are additional capabilities of that same architecture that allow you to deploy to other browsers. So, for example, you can start a JUnit test run and point that test runner at a Mozilla form, for example or Internet Explorer form or Safari form. So, it makes it really easy to test all these different browsers in situ. So, we found that it really makes cross value testing a whole lot easier.

Threaded replies

·  Tech Talk: Bruce Johnson on Google Web Toolkit by Joseph Ottinger on Tue Dec 12 09:22:31 EST 2006
  ·  Re: Tech Talk: Bruce Johnson on Google Web Toolkit by Alexa White on Tue Dec 12 11:02:06 EST 2006
    ·  Re: Tech Talk: Bruce Johnson on Google Web Toolkit by Cyril Gambis on Tue Dec 12 12:37:13 EST 2006
    ·  Re: Tech Talk: Bruce Johnson on Google Web Toolkit by Rodolfo de Paula on Tue Dec 12 14:19:57 EST 2006
    ·  Re: Tech Talk: Bruce Johnson on Google Web Toolkit by Casual Visitor on Wed Dec 13 09:23:05 EST 2006
  ·  Dojo? by Tsolak Petrosian on Tue Dec 12 12:29:31 EST 2006
    ·  Re: Dojo? by Casual Visitor on Wed Dec 13 09:25:46 EST 2006
      ·  Re: Dojo? by Tsolak Petrosian on Wed Dec 13 11:58:10 EST 2006
        ·  Re: Dojo? by Charlie Collins on Thu Dec 14 06:56:56 EST 2006
          ·  Re: Dojo? by Tsolak Petrosian on Thu Dec 14 12:28:45 EST 2006
  ·  Great idea! by Casual Visitor on Tue Dec 12 18:40:05 EST 2006
  ·  Great tool! by Yann Caroff on Thu Dec 14 07:42:53 EST 2006
  Message #223811 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Tech Talk: Bruce Johnson on Google Web Toolkit

Posted by: Alexa White on December 12, 2006 in response to Message #223790
I have only one important question so far. Why Google does not use GWT to develop the own services on the google.com? The new services are introduced since the May 2006, but none of them are based on GWT.
In general, GWT still misses the rich component set (aka Widgets) like any other libraries such as Backbase, ADF/Trinidad, QuipuKit for java or telerik for .net. Only the primitives are not enough for starting a rapid development.

=AlexaW, http://ajax-tutorials.com

  Message #223819 Post reply Post reply Post reply Go to top Go to top Go to top

Dojo?

Posted by: Tsolak Petrosian on December 12, 2006 in response to Message #223790
And why not just join DOJO support group.

  Message #223821 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Tech Talk: Bruce Johnson on Google Web Toolkit

Posted by: Cyril Gambis on December 12, 2006 in response to Message #223811
Which new services?
picasa web? google docs & spreadsheets? google maps?

Cyril

  Message #223835 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Tech Talk: Bruce Johnson on Google Web Toolkit

Posted by: Rodolfo de Paula on December 12, 2006 in response to Message #223811
http://www.thinwire.com also has richer widgets and is open source.

  Message #223855 Post reply Post reply Post reply Go to top Go to top Go to top

Great idea!

Posted by: Casual Visitor on December 12, 2006 in response to Message #223790
Develop in Java, deploy in JavaScript/HTML. GWT is a typical Google product. It centers around usability and user experience, not around abstract 'concepts'. Emphasis is placed on convenience and manageability for the user (the developer in that case). 'Monolithic' compilation is a feature in that concept, not a burden (contrast that to frameworks that foster XML configuritis).

One (minor) problem (which is mentioned in the interview) remains. GWT may not be 'forward' compatible, i.e. you may need to re-compile your code after major browser releases. I hope the GWT team will some day find a JavaScript/HTML subset that is both Standards-(W3C-)conforming and usable for all major browsers.

BTW, I've already seen a job offer requiring experience with the 'Google Framework'.

  Message #223891 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Tech Talk: Bruce Johnson on Google Web Toolkit

Posted by: Casual Visitor on December 13, 2006 in response to Message #223811
In general, GWT still misses the rich component set (aka Widgets) like any other libraries such as Backbase, ADF/Trinidad, QuipuKit for java or telerik for .net. Only the primitives are not enough for starting a rapid development.

but good enough to start GWT!

  Message #223892 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Dojo?

Posted by: Casual Visitor on December 13, 2006 in response to Message #223819
And why not just join DOJO support group.

Is Dojo written in Java??

  Message #223907 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Dojo?

Posted by: Tsolak Petrosian on December 13, 2006 in response to Message #223892
no

  Message #223968 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Dojo?

Posted by: Charlie Collins on December 14, 2006 in response to Message #223907
And does Dojo (or any of the other toolkits implied here by previous commenters to be better choices) include a server side portion, with object serialization, while starting from Java and emitting cross browser JavaScript?

GWT is not meant to compete with purely JavaScript based client side only AJAX solutions, many of which are really damn good. This includes Dojo, Sciptaculous and so on. Instead GWT is a different approach, starting from Java, and it ALLOWS you to integrate those other JavaScript libraries using it's JSNI mechanism, something that is commonly done.

And GWT does not try to have as many fancy UI widgets as do the others. That is not the point of GWT. What is the point is a solid and robust set of core widgets, in a *toolkit*, which you can then use to build upon to create more involved widgets yourself (or you can grab one of many third part libraries that already do lots of this, GWT Widget Library, GWT tk GWm, etc).

GWT is not analogous to all the other things it's being compared to here. A better analogy would be to Echo2, which does also start from Java (and is itself also very impressive). Yet even that takes a bit of a different tact and is more server side focused (with a ClientEngine, but not the same as bulk on the client like GWT).

GWT is significant, it is a move back towards a "rich client" but also inclues an RPC portion (to facilitate another tier) and has the advantages that it starts from a non idiomatic, non dynamic language, while still using the ubiquitous "browser" as the base.

Again, all those other JavaScript AJAX libraries are fantastic for what they do, but they do not solve the same problems as GWT.

  Message #223976 Post reply Post reply Post reply Go to top Go to top Go to top

Great tool!

Posted by: Yann Caroff on December 14, 2006 in response to Message #223790
After downloading GWT yesterday, buying and reading the online book from Ed Burnette, and having a quick run through the examples, at first glance, I'm very impressed by the product. The original GWT concept is particularly interesting and I have a feeling that this is the right approach for RIAs. Learning curve is close to flat, especially for someone experienced in Swing and who knows the way AJAX works. Being in Java first, it can be unit-tested, performance-tested, properly documented. The AJAX and cross-browsers JavaScript intricacies are hidden, so are the hassle of the Back/Forward button, validation, error messages and internationalization.

It really looks like a great tool to design and deploy rich GUIs as far as productivity is concerned. I'll look deeper into it.

The only missing area is the way security is handled (authorization that is). If anyone has advices in that respect, I'd gladly listen.

Congrats to Bruce Johnson's team in any case!

Yann

  Message #224020 Post reply Post reply Post reply Go to top Go to top Go to top

Re: Dojo?

Posted by: Tsolak Petrosian on December 14, 2006 in response to Message #223968
Probably some might use GWT. Personally I would prefer to write UI straight in JavaScript with full control on things than write Java code against some framework and auto generate JavaScript from it. I just cant see how you can write serious application with auto generate Java.

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 2

Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (January 21, Article)

Ted Neward Q&A: What you must know about JavaScript, Scala and more

Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala. (January 15, Article)

Developers split on open sourcing Java

Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language. (November 24, Article)

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Free Book PDF Download: Mastering EJB Third Edition

Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map