Search Logger
Posts from: Sumit Chandel, Developer Programs Engineer

Author Archive

Google API Libraries for GWT Update

12:45 pm - February 6, 2009 in Google Web Toolkit Blog

Another round of updates is ready for the Google API Libraries for Google Web Toolkit (GWT). This update brings bug fixes and new features to three of the existing libraries. The Google Visualization API Library for GWT moves from a release candidate to a public release with a few bug fixes. The Gadgets API Library for GWT now supports GadgetAds , gadget based internationalization and an important bug fix for Windows developers using GWT hosted mode. The Google Maps API Library for GWT now includes support for the GAdsManager and reverse geocoding support. We are also announcing a major update to the Gears API Library for GWT to support the Gears 0.4 feature set, which includes Geolocation, HTTP Request, Desktop and Blob support.

This release is exciting to me not just for the new features that have been added, but also for the number of new contributors to the libraries from the open source community. Special thanks to Mark Renouf for contributing Gears 0.4 support, and all those that filed issues and contributed patches.

You can find the new libraries ready for download on Google Code.

 

GWT Community Updates

12:37 pm - February 19, 2009 in Google Web Toolkit Blog

A couple of months ago, we put the spotlight on the GWT community to highlight some of the great things that have been going on. Since then, there has been a lot of new activity to talk about, so we'd like to share these announcements with you below:

Community announcements

GWT Server Library (GWT-SL) 0.1.5b Released: The GWT-SL library provides developers with a way to easily use GWT with the Spring framework. In this latest release, the library provides support for integration with Gilead (formerly known as hibernate4gwt) and has been updated to work with GWT 1.5.3, and also includes many other new features and improvements.

Gilead 1.2.1 Released: Gilead lets you export persistent entites from the JVM to the outside world. For GWT, it means easy integration with Hibernate. This maintenance releases includes support for Maven support and comet4gwt among other new enhancements. If you use Hibernate, or any other of the new technologies Gilead now supports, check out the library on their project page.

Dependency Injection in GWT: You may already be familiar with GIN (GWT INjection), a dependency injection library that integrates GWT with the Guice framework. However, in case you wanted to try a new flavor of guice (pun intended), you may want to take a look at the recently introduced suco library, which offers its own guice-style dependency injection technique.

emite 0.4.6 Released: emite is an open-source library that implements an XMPP communication protocol and provides hooks for GWT integration. This means you can now make your GWT applications more chatty using this library. If you want to have your users chatting over and about your GWT application, this library might be worth checking out.

More fun stuff

Google I/O: Google's developer conference is coming back again this year at the Moscone Center in San Francisco, California. If you attended last year, you'll know that lots of great talks and impromptu chats with Google engineers await. Like last year, the conference will feature a handful of awesome GWT related talks, not to mention members of the GWT team onsite to answer all your questions. Check out the registration page if you'd like to meet some of us in person.

 

Giving your GWT Application a Voice

7:20 pm - March 4, 2009 in Google Web Toolkit Blog

As a faculty member at the Georgia Tech Center for Music Technology, I recently developed Piano Etudes, a musical application built with GWT, along with a student of mine, Akito Van Troyer. Since Piano Etudes is about music, audio was a top priority for us throughout the development process. In this post, I’d like to share what we’ve learned from our experiences with audio and GWT and explain how we implemented audio functionality.

There is currently no built-in audio support in GWT; nevertheless, it’s fairly simple to add audio to a GWT app. Several audio APIs for GWT exist in various stages of development, including Fred Sauer’s gwt-voices, CodeLathe’s GWT SoundManager, Jeffrey Miller’s gwt-sound, and the sound classes in the GWT Incubator. Most of these libraries in turn rely upon the Flash Sound API instead of the inconsistent audio support found natively in web browsers.

For Piano Etudes, we found it easier to build our own GWT classes to support the audio features we needed, instead of using one of the APIs listed above. We wrote JSNI methods to access Scott Schiller’s SoundManager2 Javascript Sound API. SoundManager2, which similarly relies upon Flash, is a clean and elegant API that Scott has been fanatically supporting and updating. A couple of the GWT audio libraries also use SoundManager2, though they only support a subset of its API.

Regardless of how you choose to implement audio in your GWT app, we've discovered a few key principles while working on Piano Etudes that you may want to consider:

  1. Keep your audio code in separate Java classes
  2. Tune your application to avoid timing problems with audio
  3. Identify complex audio rendering and move it from the client to the server when necessary

Keep your audio code separate

Because audio support in GWT is rapidly evolving, the API you choose to use today may not be the one you use a year from now. So it’s essential to wrap your audio functionality in your own audio classes. Then if you change implementations later, you’ll only have to tweak a few classes instead of auditing your entire code base.

For Piano Etudes, we created two GWT Java classes to handle all audio functionality. These are the only classes in our code base that assume a particular audio implementation and are also the only classes that contain JSNI methods.

One class, called SoundManager, includes static JSNI methods for initializing SoundManager2 and configuring its global parameters.

For example, Soundmanager.setDebugMode() will enable or disable debugging:

public native void setDebugMode(boolean b) /*-{
  $wnd.soundManager.debugMode = b;
}-*/;

Each instance of our other class, called Sound, represents a single audio file to be played back in GWT. This class wraps methods such as play, pause, stop, getting and setting panning, and getting and setting playback position.

It was important for us to hide SoundManager2’s implementation details from the rest of our GWT code. Both SoundManager2 and parts of our GWT application code have their own bookkeeping, so there is potential for bad cross usage if the code isn't kept separate. For instance, SoundManager2 requires that an ID string be assigned to each sound object, and it uses that ID in many of its methods. Our Sound class handles this ID string internally and privately. The constructor method generates a unique ID string for each instance of the Sound object:

public Sound(String fileName) {
  soundID = CustomIDGenerator.getUniqueId();
  
  // additional initialization code
}

The Sound object then uses this ID in other methods. For example:

public native void stop() /*-{
  $wnd.soundManager.stop(this.@net.jasonfreeman.pianoetudes.client.sound.Sound::soundID);
}-*/;

There is no need for any other application code to be aware of this ID string; they are able to use instances of Sound in a more object-oriented, implementation-neutral manner.

Tune your application for well-timed audio

In Piano Etudes, the timing of audio events is important. Typically, each measure of moveable music is stored as a separate audio file, so when audio files do not play back at the correct times, there is an audible gap or jump between measures of music. Audio timing is similarly important in applications where sound effects are triggered by user actions or where multiple audio files must play back together in sync.

Neither Javascript nor Flash are famous for precise timing, so there is an upper bound on timing precision within GWT as well. But there are a few strategies that do improve precision:

  • Optimize GWT code. The performance of your audio code can be affected by sluggish code elsewhere. We use a combination of Java and Javascript profiling tools to isolate hot spots and resolve performance problems. It’s also important to realize that even if your app doesn’t feel sluggish, it may still suffer from performance problems that affect audio. For example: I once found a bug in a conditional statement that had turned O(n) code into O(n2) code. Even though the problem was not noticeably slowing down the GUI widget with which it was associated, it was degrading the timing of audio events.
  • Beware of silent gaps at the beginning and end of MP3 files. These are often created in the encoding process and can cause unwanted delays in audio playback. Use an encoder, such as LAME, that supports a "nogaps" option.
  • Preload your sound files. When timing is important, create your sound objects and load your audio files in advance. If you wait to do so until the moment you are ready to play them, there will be a noticeable delay the first time each sound is played. In SoundManager2, the "autoLoad" flag will force audio files to load in advance.

Know when it’s time to move server side

Both Flash and GWT have limited capabilities when it comes to audio. You can play sounds, jump around within sounds, combine them together, query waveform data, and perform other basic tasks. Newer versions of Flash do support some sample-level manipulation of audio data, but it would be tough to use these features from JavaScript or, by extension, from GWT. (In fact, it’s tough to use these features at all in their present form.)

So what if your GWT app requires advanced audio features such as sample-accurate timing, sound synthesis, digital signal processing, or mixdowns to audio files? You could implement audio functionality in a Java applet instead of through Flash, taking advantage of a Java-based audio API such as JSynJavaSound, or Minim to access additional features unavailable in GWT. But if you’re like me, the headaches associated with Java applets are one of the reasons you’re using GWT in the first place, so that is not an enticing solution.

Fortunately, there is another alternative: render your audio on the server. This successfully avoids the limitations of client-side systems, though it does introduce other issues related to scalability, latency, and bandwidth. While it’s not a universal solution, it is a valuable strategy for your toolbox.

Here’s a simple use case: in Piano Etudes, we wanted users to be able to download the music they created as an MP3 file. In GWT and Flash there is no obvious way to render an audio file to disk or to convert it into an MP3. So instead, we handle this task server side.

When a user clicks a button to download the MP3 of their music, GWT sends a representation of that music to the server; for each audio track, it describes the audio clips in the track and the timings of those clips. We post the data as JSON via HTTP to a PHP script, but this could be done just as easily via any other client-server communication paradigm supported in GWT. Here’s some code for the client side:

FormPanel mp3Form = new FormPanel("_blank");
HorizontalPanel panel = new HorizontalPanel();
Hidden mp3Data = new Hidden("data", timeline.getAsJSON());
panel.add(mp3Data);
mp3Form.setWidget(panel);
mp3Form.setAction(URL.encode(SERVER_SCRIPT_URL));
mp3Form.setMethod(FormPanel.METHOD_POST);

This code snippet submits a JSON array to the server representing the audio clips and timings for each track of music. The JSON data is sent as a hidden field in an HTML form. The result obtained from the server (the MP3 file) is returned to a new web browser window, keeping the GWT app open in the current window.

When the server-side script receives the data from the client, it processes that data to create and run a simple script in a computer-music language called RTCmix. (Classic scripting languages for computer music, such as CSound and RTCmix, are great for rendering audio server-side.) The audio file output by the RTCmix script is then converted to an MP3 using LAME, and that file is returned to the client browser, which downloads it. Here is a simplified excerpt from our PHP script (our entire script is only 100 lines of code):

// initialize the rtcmix script
$audio = tempnam("/tmp", "PianoEtude"); // output file
$script = "set_option(\"AUDIO_OFF\", \"CLOBBER_ON\")\n"; // non-real-time
$script .= "rtsetparams(44100, 2)\n"; // sampling rate and number of output channels
$script .= "rtoutput(\"$audio\")\n"; // output to temp file
$script .= "load(\"" . $CMIX_LIB_PATH . "\")\n"; // library path for rtcmix

// create an rtcmix command to place each audio clip
$timeline = json_decode($data);
foreach ($timeline as $track) {
  $insertPoint = 0;
  foreach ($track as $soundObject) {
    $soFileName = $soundObject[0];
    $soDur = $soundObject[1];
    $script .= "rtinput(\"$soFileName\")\n";
    // insert the audio clip into the output audio file
    $script .= "STEREO($insertPoint, 0, DUR(), 0.5, 0.5, 0.5)\n";
    $insertPoint += $soDur;
  }
}

// execute the rtcmix script
$scriptFile = tempnam("/tmp", "script");
$handle = fopen($scriptFile, 'w');
fwrite($handle, $script);
fclose($handle);
$cmd = "$rtcmix < $scriptFile";
$result = shell_exec($cmd);

// convert to MP3
$mp3File = tempnam("/tmp", "mp3");
$cmd = "$lame $audio $mp3File";
$result = shell_exec($cmd);
// return result
readfile($mp3File);

You can also use client-side and server-side audio together. For example: instead of just having the web browser download this server-generated MP3 file to disk, our GWT app could use a client-side audio API to play it back inside of the app.

Let your GWT application be heard

By using a variety of GWT or Javascript APIs to connect with the Flash Sound API, you can add rich audio features to your GWT apps; for more advanced functionality, GWT apps can communicate with a server to render audio remotely. Regardless of the exact implementation(s) you choose, keeping your GWT app optimized and your audio code structurally isolated will ensure that audio performs well in your app and can incorporate future improvements to audio support in the browser

 

GWT Community Updates

12:02 pm - April 2, 2009 in Google Web Toolkit Blog

It's about that time again.  We've had a lot of activity in the community since the last update that we'd like to share. Check them out below:

Community announcements

Spreading the word: The community is lucky to have a number of active members who blog, present and contribute to GWT. They are often a great resource for more news about GWT than can be tracked in our own single blog. Check out some of these GWT gems below:

  • onGWT: maintained by Didier Girard, it's constantly updated with tidbits of news relating to GWT.
  • Roughian Examples : Ian Bambury has created a site that gives a different take on how GWT components fit together. There is also a free email course available!

IT Mill Toolkit 5.3.0 production release ready: The folks at IT Mill have worked hard to create IT Mill Toolkit - a set of technologies and tools that allow you to develop Ajax applications using Google Web Toolkit based, server-side binded widgets. Check out their latest production release announcement for more details.

GWT Articles section revamped: We've been working on updating and enriching articles on various GWT topics. The latest addition treats the topic of testing methodology using GWT. Please check out the new articles and let us know what you think of them. Also, if there is a topic that you are an expert on that you would like to write about, get in touch with us.

More fun stuff

Google I/O

: Google's developer conference is just around the corner. If you're planning on attending, you're still in time for early bird registration prices! There are going to be some great GWT sessions presented at this year's conference that you won't want to miss. We're hoping to see you there!
 

GWT Community Updates

11:27 am - April 30, 2009 in Google Web Toolkit Blog

Community announcements

Need a diagramming component in your GWT app? Now you can have one, thanks to the gwt-connectors project developed by Robert Waszkowski. The gwt-connectors project, which uses Fred Sauer's gwt-dnd, allows you to create components, drag them around, connect them together, and then drag some more (with connectors redrawn appropriately). It's really quite fun, you should give it a try.

HtmlUnit 2.5 released: For many, using JUnit TestCase and GWTTestCases to test their GWT applications is enough to sleep easy at night. However, in some cases, you want to test app navigtation flows in an automated way. For these cases, HtmlUnit comes to save the day. The HtmlUnit framework allows you to write tests that navigate through your application, fill forms, access attributes and values and so forth,  and includes support for GWT.

A SimpleGesture goes a long way: A developer at IT Mill Toolkit decided to use his 10% time to build something really neat - a gesture-recognizing widget. Using SimpleGesture, you can capture mouse gestures in a given widget and trigger an associated action. You should give the demo a try if you want to see it in action, and look up the source code if you want to code it into your own applications. It turns out that this widget also works quite well with a Wiimote.

More fun stuff

Google I/O: The Google I/O website has been updated with new sessionsspeakers  and developer sandbox participants . It will be a great event for those who want to learn the latest about Google developer products or who want to mingle with other developers who are in the field and have built applications using Google technologies. We're hoping to see you there!

 

GWT and Maven – Playing Nicely Together Since 2008

3:55 pm - May 4, 2009 in Google Web Toolkit Blog

Maven is a great resource that allows developers to enable dependency management within their GWT web applications. While a complete description of Maven's dependency management is beyond the scope of this article, we encourage you to read more here . Essentially, Maven allows you to modularize your GWT project, separating the reusable pieces of code (i.e. Custom Widgets or Data Transfer Objects) into their own projects while maintaining versioning. In addition, Maven allows you to incorporate several different modules without having to write/maintain a complex Ant build file.

Modularization

When developing your application you may quickly realize that it would be beneficial to separate large pieces into separate modules for easier management and reusability. We have multiple internal applications that use the same Data Transfer Objects and Custom Widgets. In our case, we found that separating these two pieces into separate modules made everyone's life easier. In order to accomplish this, we created two separate Maven modules, studyblue-data and studyblue-widgets.

Your resulting project hierarchy will look like this once its all hooked up:

Diagram illustrating a StudyBlue sample project hierarchy

Each of the new modules (data and widgets) look similar to the main project because they contain a gwt.xml file, however their project structure looks like this:

+ studyblue-data/
  + src/
    + main/
      + java/
        + com.studyblue.data/
          Data.gwt.xml
        + com.studyblue.data.client/
          Data.java
          ...
      + resources/
    + test
      + java/
      + resources/
  pom.xml

Your Data.gwt.xml file would look like this:

<module>
  <!-- Inherit the core Web Toolkit stuff. -->
  <inherits name="'com.google.gwt.user.User'/">     
  <source path="client">
</module>

Your Data.java file would be empty in most cases:

package com.studyblue.data;

import com.google.gwt.core.client.EntryPoint;

public class Data implements EntryPoint {
  
  public void onModuleLoad() {
  
  }
}

As per usual, your source code goes under the com.studyblue.data.client package. We created an additional project for studyblue-widgets similar to the one above. At this point, you should have three projects open in your Workspace (your main web app, your newly created data module, and your newly created widget module). Once you've organized your code, it's time to hook it up with your core web application via a few hooks with Maven and the gwt.xml files.

Connecting to Maven

So what is that pom.xml file all about? The first step is downloading the GWT-Maven plugin for Eclipse (which takes care of most of the heavy lifting) http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/index.html . Once you've installed the plugin, you're ready to organize your pom.xml files (one each for: data, widgets, web app).

Our studyblue-data pom.xml file looks like the combination of the following:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi="http://www.w3.org/2001/XMLSchema-instance" schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

  <modelversion>4.0.0</modelversion>
  <groupid>studyblue</groupid>
  <artifactid>studyblue-data</artifactid>
  <version>1.1.0-SNAPSHOT</version>
  <packaging>jar</packaging>
  <name>studyblue gwt data</name>

This is the portion that indicates how the jar should be created. The jar's title is "[artifactId]-[version].[packaging]". The parts in red, you would subsitute with your own information. *Note: We use -SNAPSHOT to notify Maven that the jar should be updated on every build (see below).

  <repositories>
    <repository>
      <id>gwt-maven</id>
      <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
    </repository>
  </repositories>

  <!--  include pluginRepository and repository for GWT-Maven -->
  <pluginrepositories>
    <pluginrepository>
      <id>gwt-maven-plugins</id>
      <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
    </pluginrepository>
  </pluginrepositories>

The repositories tag tells your project where to download the gwt jars (servlet, user, etc). The pluginRepositories tag tells your project where to download the Maven-GWT plugin.

  <build>
    <plugins>
      <plugin>
        <artifactid>maven-compiler-plugin</artifactid>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactid>maven-eclipse-plugin</artifactid>
        <version>2.5.1</version>
        <configuration>
          <additionalprojectnatures>
            <projectnature>org.maven.ide.eclipse.maven2Nature</projectnature>
          </additionalprojectnatures>
          <additionalbuildcommands>
            <buildcommand>org.maven.ide.eclipse.maven2Builder</buildcommand>
          </additionalbuildcommands>
        </configuration>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/client/**</include>
          <include>**/*.gwt.xml</include>
        </includes>
      </resource>
    </resources>
  </build>

The build tag tells Maven what Java version you want your jar to be compiled into (1.6 in this case). The resources tag lets your project compiler know which java files should be included in the jar (i.e. ALL YOUR CODE).

  <properties>
    <gwtversion>1.5.3</gwtversion>
  </properties>

The properties tag allows us to set a variable (gwtVersion) so Maven knows which version of GWT it needs to download when compiling. When it's time to upgrade, just change the version and the rest takes care of itself.

  <dependencies>
    <dependency>
      <groupid>com.google.gwt</groupid>
      <artifactid>gwt-user</artifactid>
      <version>${gwtVersion}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

The dependencies tag tells your project which jars you need to compile. In the case of the studyblue-data and studyblue-widgets modules, we reference the GWT user jar, so we need to include it. Notice it takes use of the gwtVersion variable. There are six different types of scope. The three most important are "runtime", "provided" and "compile". Runtime means "I don't need it during compilation of the jar, but I do need it when the jar is executed." Provided means "The project that depends on this module will provide the jar". Compile means "This module needs the jar immediately for compilation".

In this case, we plan on connecting the studyblue-data and studyblue-widget modules to our main web app, which will "provide" the necessary GWT jars for these modules.

    <dependency>
      <groupid>studyblue</groupid>
      <artifactid>studyblue-data</artifactid>
      <version>1.1.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>

If one module needs to reference an additional module (i.e. studyblue-widgets depends on studyblue-data), you could insert the above code into studyblue-widget dependencies.

  </project>

Don't forget to close your project tag :) Make sure you generate the appropriate pom.xml for your widgets module as well.

Deployment

Alright, so you've separated your data and widgets from your main app. You built two projects and included a pom.xml file in each. Now it's time to build studyblue-data and studyblue-widgets into jars so you (and your teammates) can use them as necessary.

This part is super easy, just open command prompt or terminal and navigate to the project's root folder. Type the following:

  mvn clean deploy

That's it. Your project will be compiled with all the necessary libraries and is available for consumption by you and your teammates under the title entered above (studyblue-data-1.1.0-SNAPSHOT.jar and studyblue-widget-1.1.0-SNAPSHOT.jar).

Putting It All Together

So, you now have the two jars available, and you could just simply add them to your main web app's classpath. However, if you enable Maven on your main web app, you'll be able to take advantage of Maven's dependency management. This way you'll be able to download updated jars instantly and automatically. Additionally, assuming your main web app project is Mavenized you can include the GWT jar dependencies (servlet, user, etc) in the web app automatically.

To do this, you need to insert the following into your main web apps pom.xml below the properties tag:

  <profiles>
    <profile>
      <id>gwt-dev-windows</id>
      <properties>
        <platform>windows</platform>
      </properties>
      <activation>
        <activebydefault>true</activebydefault>
        <os>
          <family>Windows</family>
        </os>
      </activation>
    </profile>
    <profile>
      <id>gwt-dev-mac</id>
      <properties>
        <platform>mac</platform>
      </properties>
      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>
    </profile>
    <profile>
      <id>gwt-dev-linux</id>
      <properties>
        <platform>linux</platform>
      </properties>
      <activation>
        <os>
          <name>Linux</name>
        </os>
      </activation>
    </profile>
  </profiles>

The profiles tag allows our developers to use whichever GWT jars are necessary for their operating system (takes care of Windows vs. Mac vs. Linux automatically :) ). No more keeping copies of all GWT jars and native libraries in your project folder.

Finally, modify the dependencies section to look like this:

  <dependencies>
    <dependency>
      <groupid>com.google.gwt</groupid>
      <artifactid>gwt-servlet</artifactid>
      <version>${gwtVersion}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupid>com.google.gwt</groupid>
      <artifactid>gwt-user</artifactid>
      <version>${gwtVersion}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupid>com.google.gwt</groupid>
      <artifactid>gwt-dev</artifactid>
      <version>${gwtVersion}</version>
      <classifier>${platform}-libs</classifier>
      <type>zip</type>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupid>com.google.gwt</groupid>
      <artifactid>gwt-dev</artifactid>
      <version>${gwtVersion}</version>
      <classifier>${platform}</classifier>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupid>studyblue</groupid>
      <artifactid>studyblue-data</artifactid>
      <version>1.1.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupid>studyblue</groupid>
      <artifactid>studyblue-widgets</artifactid>
      <version>1.1.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>

Notice here that the <scope> for the GWT jars is "compile", which ensures they are downloaded during compilation of the web app and "provided" to the dependent modules studyblue-data and studyblue-widgets. The GWT servlet jar is only needed when the web app is executed, so we choose "runtime" here.

Don't forget your gwt.xml

In order to make sure that our main web app knows about studyblue-data and studyblue-widgets we have to include the following lines in our main app's gwt.xml file:

<inherits name='com.studyblue.data.Data' />
<inherits name='com.studyblue.widgets.Widgets' />

Reflecting Updates In Your Modules

During development, we want our main web app to reflect changes that we make in the modules (studyblue-data and studyblue-widgets), everytime we build the project. This way every developer who is working on a project that references the modules (including our main web app), can get the latest build of the jars. We use the Maven keyword "-SNAPSHOT" when versioning our modules during development (i.e. studyblue-data-1.1.0-SNAPSHOT). Snapshot is a special version that indicates a current development copy. With a SNAPSHOT version, Maven will automatically fetch the latest SNAPSHOT every time you build your project. For rapidly moving code, this can be a necessity, particularly in a team environment. When you are ready to release the code, you finalize the version by removing "-SNAPSHOT".

To update your SNAPSHOTS before executing hosted mode or compilation, run this command in your project's root directory:

mvn clean --update-snapshots

Running Hosted Mode and Compiling

As long as your Maven dependencies are added to your project's classpath, you can execute hosted mode and GWT-Compile without worry. At StudyBlue, we use the Maven plugin for Eclipse (http://m2eclipse.sonatype.org/update/ ) to add all our Maven dependencies to our classpath, update snapshots and for editing the pom.xml files.

Conclusion

Maven can be tricky to setup, but once you've got it connected to your GWT project, you'll be amazed at how efficient and modular your application can become.

 

Google API Libraries for GWT – May 2009 Release

5:22 pm - May 7, 2009 in Google Web Toolkit Blog

We are pleased to announce updates to the Google API Libraries for the Google Web Toolkit  project.  The Google API Libraries for GWT project allows GWT developers to access some of Google's popular JavaScript APIs.  This release contains new bindings for two libraries:

These libraries each come with sample code and Javadoc documentation.

In addition, other libraries have been updated.  Highlights include:

  • UI Styling and full GoogleBar support for the Google Maps API.
  • Ajax Loader support integrated with Search, Maps, Language, and Visualization.
  • Formatters support, new event types, and new OrgChart features added to bindings for Google Visualization API.
  • Bugfixes for the Gears API wrappers, for a full release of support for Gears 0.4 features.
  • Locked Domain feature added and improved performance for the Gadgets API.
These updates are now available for download at the Google API Libraries for GWT  project hosted on Google Code.
 

New GWT App Gallery posted (check it out)

11:30 am - May 28, 2009 in Google Web Toolkit Blog

A couple months ago, we asked the community to tell us about their GWT applications and their experience developing them. We were greatly pleased to see many responses, and lots of neat applications. In fact, we had so many responses that we needed a better way to showcase and share them with the community.

Introducing the new GWT Application Gallery to save the day, now posted on the GWT homepage. Improving on the earlier GWT Application Gallery, the new gallery adds more features to make community interaction easier and application entries more meaningful. Here are some of these new features that you can look forward to:

  • An easier way to submit entries for any GWT-related tools or application that you would like to share with the community
  • A comment and rating system for others in the GWT community to rate your applications
  • More screen real estate for application screenshots and thumbnails for your application entry
  • Searchable tags that you can apply to your GWT application entry

We already have a number of entries both from the previous app gallery and newer entries from respondents to our call out a few months ago, and we'd love to hear from you too. So please, check out the new GWT App Gallery to see the kind of great applications the community has been developing, share your opinions through the comments and ratings feature, and add your own applications to the gallery.

As a sidenote, Google I/O is in full swing. In the spirit of sharing applications and development experiences, we've organized a Developer Sandbox area this year where third party developers who have used Google developer products can showcase their applications and talk about how they've created them. If you're attending Google I/O, drop by to check out some of these products live. I'll be around that area as well, so please come by to say hello.

 

GWT Community Updates

7:04 pm - June 11, 2009 in Google Web Toolkit Blog

Community announcements

Gilead GWT adapter for Google App Engine: Bruno Marchesson, creator of the Gilead (aka Hibernate4GWT) library, has created another adapter - this time for GWT applications running on App Engine. It is still in its early stages, but this may be useful to those looking to build their applications using GWT and Google App Engine and who don't mind hammering on fresh code.

Vaadin 6 (formerly IT Mill Toolkit) releases: The IT Mill team has come out with the latest release of their toolkit built using GWT technology. Vaadin offers a different take on Ajax application development that employs server-driven architecture with widgets composed of both client and server-side components. Their latest release is available on their new site.

SmartGWT out of beta with v1.1 release: Sanjiv Jivan has been hard at work getting the SmartGWT library ready for its out of beta release. It includes many useful new features that you might be interested in checking out.

Google I/O 2009 - Caught on video

GWT at Google I/O: In case you missed it, we've captured all the GWT sessions at Google I/O on video, including the keynote presenting Google Wave (built with GWT).

GWT Developers at Google I/O: A few external developers who use GWT also stopped by I/O and participated in the Developer Sandbox. Despite all the hustle and bustle around the sandbox area, we managed to talk to some of them on video about their development experience. Some of those we talked to include:

We also talked to many other developers using Google Technologies to create some great applications.

 

GWT Community Updates

2:09 pm - July 28, 2009 in Google Web Toolkit Blog

Community announcements

GWT-in-the-Air (and in Yahoo! BrowserPlusTM): Thomas Broyer, one of our GWT contributors and a regular on the forum, has been working on the GWT-in-the-Air project over the last year. The project provides an Adobe AIR version of your GWT application, making it ready to run in the browser or on the desktop. Thomas has most recently added support for Yahoo! BrowserPlusTM as well, which allows you to add desktop capabilities to your GWT app.

GChart 2.6 released: John Gunther recently announced the GChart 2.5 release, which adds a GWT canvas rendering option for better looking charts and graphs.GChart 2.6 was also published recently which fixes deprecated event listener calls and other bug fixes. Check out the live demo and examples if you're interested in using it for your own GWT application.

An early look at Spring4Gwt: Dustin Mallory has recently created a new project called spring4gwt, which, as you may have guessed, offers a way to integrate GWT with the Spring framework. The project is still in its early stages, but aims to offer both exported Spring services to the GWT client and DI that works specifically for Spring components.

GWT-cs - Springifying your GWT application code: We've seen integrating with Spring, but what if you wanted to develop your GWT client-side code in a Spring-like fashion? In comes the newly started GWT-cs project for just such a use case. With this library, you can develop your GWT client-side application structure using Spring-like bean configuration in an XML format.

Uploading with GWTUpload: While the FileUpload widget in GWT core provides one part of the key to uploading files in your GWT applications, the server-side component and it's interaction with the client-side form submission is often the part developers get stuck on. Using GWTUpload, you can get file uploads ready in just a few steps. You also get other nifty features like progress bars showing file upload progress (file size, bytes transferred).

New Articles on the GWT homepage

We've recently published new articles on the GWT homepage, including:

These articles were created to address the many inquiries we've seen on integration and testing topics, so hopefully they will be helpful to you if you're at the point of making integration or design decisions in your GWT project. Also, many of these articles were written in collaboration with the GWT developer community, so if you have any articles or topics that you would like us to consider for publishing on the GWT homepage, feel free to get in touch with us.

 
 
 
 
 
 
It's All About Search | © clsc.net |
2012.05.1823:24
Tech used here: Valid HTML - Valid CSS - Valid RSS - JavaScript - PHP - Smarty - MySQL - and a partridge in a pear tree.