Back to Todomvc

Google Web Toolkit TodoMVC Example

examples/gwt/readme.md

2.0.03.0 KB
Original Source

Google Web Toolkit TodoMVC Example

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords and Orkut. It's open source, completely free, and used by thousands of developers around the world.

Google Web Toolkit - developers.google.com/web-toolkit

Learning Google Web Toolkit

The Google Web Toolkit website is a great resource for getting started.

Here are some links you may find helpful:

Get help from other Google Web Toolkit users:

If you have other helpful links to share, or find any of the links above no longer work, please let us know.

Implementation

This application is rather different than most of the other TodoMVC versions in that it is written in Java which is compiled to JavaScript. The files within the gwttodo folder are the result of running the GWT compilation process on the Java files found within the src folder. The UI pattern used by this application is Model-View-Presenter.

Whilst this application is very different to the other implementations, it still makes for an interesting comparison. Large-scale JavaScript applications are often written with GWT or Closure, with the resulting JavaScript code delivered to the client being compiled.

You can read more about the implementation on my blog.

Folder Structure

  • css - includes GWT specific app.css, most styling is taken from the base CSS file
  • gwttodo - the GWT compiled output, this includes various HTML files, which contain the JavaScript code for each <a href "http://code.google.com/webtoolkit/doc/latest/tutorial/compile.html">GWT permutation</a>. This folder also includes some redundant files, see the issue <a href="https://github.com/ColinEberhardt/todomvc/issues/9"> Remove redundant compiler output</a>.
  • src - the Java source for this application

Building this application

The GWT TodoMVC application was built with Java 1.6 and GWT 2.4.0. The easiest way to build this application is to download the GWT SDK, or together with the Eclipse plugin.