GWT Java User Group Presentation

February 17, 2010 - zenoconsultingzenoconsulting


I gave a talk February 17, 2010 at the Detroit Java User Group and the same talk on February 23, 2010 at the Ann Arbor Java User Group.

The slide deck is here.

The purpose of the talk was to give a brief intro to GWT, and describe some best practices and anti-patterns to avoid when developing with GWT. I also built a demo GWT application that demonstrates:

  • Model View Presenter
  • UiBinder
  • Navigation
  • History
  • Security / Session Management
  • GWT-RPC
  • CRUD with mock persistence layer
  • Spring WebMVC and Dependency Injection

The demo project is hosted on GitHub at http://github.com/davisford/gwt-demo.

Feel free to clone it. If you haven't used git, its pretty simple. http://learn.github.com/ is a great resource. If you install the git client, you can pull it down via:

$ git clone git://github.com/davisford/gwt-demo

or for the slower http protocol

$ git clone http://github.com/davisford/gwt-demo

It is a maven project. You can import it into eclipse easily via:

$ mvn eclipse:eclipse

Then in Eclipse: File -> Import -> Existing Project into Workspace -> Navigate to the Directory where you cloned it.

You will also want to install the Google Eclipse Plugin. This will allow you to run/debug the app directly from Eclipse.

If you want to run the demo in hosted mode from maven, you can do this:

$ mvn gwt:run

This should launch the hosted app. From there you can launch the app in the default browser, or copy/paste the URL into your favorite browser. The first time you do it, if you don't have the GWT browser plugin, it will prompt you to download and install it. After that when you refresh you should see a login screen.

Username is hardcoded in a map in the source, since I did not implement a real persistence layer. You can login with davis/davis or homer/homer.

I'll likely add more documentation to this, and probably evolve the code more as time permits. If you have questions about it or GWT in general, contact me via email or add a comment on this page, and I'll respond.


Backlinks


Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License