RESMARK Public Code

Google Web Toolkit/Google App Engine integration libraries.

If you have looked into the Google App Engine together with the Google Web Toolkit, you may have noticed that the core data types of the App Engine (Key, Text, ShortBlob, Blob, Link, User, PostalAddress, PhoneNumber, Rating) are not available for use in client-side GWT code.

RESMARK Systems is happy to share our porting of these data types with the public. This code is released under the Apache License and is free of charge. Feel free to use/modify this code to your applications specific needs. Of course we would always appreicate any enhancements or bug fixes being made public under the same or comparable licesnse.

Important notes:

The client-side implementation of these data types are meant to be simple data containers. Some features of these data types are not included. For instance, the recursive structure found in the Key class is not implemented in this code. However, the appId, kind, name and id are available on the client side if the Key instance was transmitted via an RPC call.

In addition, the string encoded value of the Key is transmitted (making it easy to pass the Key reference via url paramters etc.). The encoded value can be extracted from the Key instance by invoking KeyFactory.keyToString(Key instance) on the Key instance in question. It is important to note, however, that KeyFactory.stringToKey(String encoded) simply returns a new Key instance and only sets the encoded value of the Key on the returned instance (i.e. appId, kind, name and id are all left blank).

What's included in this porting:

  • Core GAE data types

    (Key, Text, ShortBlob, Blob, Link, User, PostalAddress, PhoneNumber, Rating).

  • Custom Field Serializers for each data type

    (to allow sending these data types over RPC invocations).

  • KeyFactory.stringToKey*, KeyFactory.keyToString*

    these KeyFactory methods are rather simple and just create a Key instance that holds the string encoded value, or extract the Keys encoded value as appropriate. Keys created this way will not have any other information in the Key (appId, name, id, kind etc.) thus those methods will simply return null or zero.

Download: