Understanding Creation of GWT Serialization Policy Files (.gwt.rpc)

Today I deep-dived a bit into how GWT creates and reads Serialization Policy files. These are the .gwt.rpc files which are generated beside the JavaScript files for GWT modules. Chiefly, I learned two things: The .gwt.rpc files are only used by the server. The client never reads them. The .gwt.rpc files are generated in the … Continue reading Understanding Creation of GWT Serialization Policy Files (.gwt.rpc)

Cross-Domain Requests in GWT with JSONP

GWT RPC is built upon AJAX requests and thus is subject to the Same-Origin Policy. However, it is really easy in GWT (as well as in other JavaScript applications) to circumvent this policy using a method called JSON-with-padding (JSONP). Unfortunately, there are a couple of issues one needs to consider before utilizing JSON-P: Amount of Data Send … Continue reading Cross-Domain Requests in GWT with JSONP

GWT Exclude Package From Source Path

Problem The Google Web Toolkit Java to JavaScript transpiler is a powerful tool to convert Java source code into JavaScript files. Unfortunately, not all Java code can be transpiled into JavaScript code by GWT. Sometimes, a project contains a mix of Java code that can be converted into JavaScript and Java code that doesn't. In that … Continue reading GWT Exclude Package From Source Path

GWT Object Serialization with gwt-storage

Problem The built in Java Serialization and various serialization frameworks available for Java allow to serialize Java objects conveniently into binary or textual representations. Unfortunately, most of these frameworks are not available for Google Web Toolkit client applications. There is no easily available built in solution for serializing GWT objects into text on the GWT client side. … Continue reading GWT Object Serialization with gwt-storage

GWT RPC Serialization for LocalStorage

GWT RPC is a great technology for sending 'Java' objects from a Java sever to a JavaScript client and vice averse. Since GWT RPC provides facilities for serializing and deseralizing Java objects, it seems like a good option, too, for preparing objects to be stored in a browsers LocalStorage. Unfortunately, the devil lies in the … Continue reading GWT RPC Serialization for LocalStorage

Google Releases Tool J2ObjC to convert Java Source Code into Objective-C Source Code

I love the Google Web Toolkit, a powerful and mature open source library to automatically translate Java Source Code into JavaScript code. While I doubt the merit of using Java to write user interfaces for JavaScript (unfortunately, this is often what the Google Web Toolkit has been advocated for), I think it is a great … Continue reading Google Releases Tool J2ObjC to convert Java Source Code into Objective-C Source Code

Something other than a Java object was returned from JSNI method

Google Web Toolkit allows building powerful bridges between the world of Java and JavaScript using so called JS overlay objects. However, these overlay objects can become it bit tricky if it is not certain what the type of objects passed from JavaScript will be. Wait? Types and JavaScript? Yes, but only the most fundamental ones … Continue reading Something other than a Java object was returned from JSNI method

Maven Module for gwt-exporter

gwt-exporter is an awesome library to generate usable JavaScript APIs for Google Web Toolkit applications. It allows writing powerful libraries in Java and reuse the features these libraries provide in JavaScript applications! I have assembled a small Maven Module for gwt-exporter 2.4 (M1), which readily configures gwt-exporter to be used as part of an OSGi-enabled … Continue reading Maven Module for gwt-exporter

Threads in GWT?

While it is widely reported that Google Web Toolkit does not support Java Threads and multi-threading, a number of aspects of concurrent applications can be emulated in GWT's single thread JavaScript world. The particular features that are relatively easy to emulate are: Timers Background Execution Locks 'Thread-safe' Collections An important theme in my implementation of … Continue reading Threads in GWT?