GWT, App Engine and App Engine Data Classes
3 min read
3 min read
I currently have some time before starting with my Master thesis project which will bring me back to Android programming. So to make use of that, I started to develop a project I already wanted to implement a couple of years ago, but due to my Master studies I didn't have the time to. I'll need some beta testers soon, so keep track of my blog here to catch the moment when everything goes online.
What I can reveal so far is that it will be a web application, using Google's GWT and it will be hosted on Google's cloud computing platform App Engine.com.google.appengine.api.datastore.Text
instead of the
String
datatype if you plan to store more than 255 character strings. Ok, that shouldn't be a problem for
us, should it? Well...not exactly. If you plan to use App Engine together with plain old JSP or whatever view
technology that it won't be a problem, but if you use GWT you have to keep in mind that you're implementing a
client-server system. The difference: the GWT client lives within the browser. So the data has to be transferred
between the two end-points and has to be serializable accordingly. com.google.appengine.api.datastore.Text
isn't serializable though. This means you cannot share your POJOs between your GWT client app and
server-side code. Now you have different possibilities. Some that come to my mind right now are..com.google.appengine.api.datastore.Text
data class.Text
and provides it for
free. I just tried it out and it works seamlessly, without writing a single additional line of code. Here some
steps on how to use it (available descriptions on the web are really bad).<inherits name="com.resmarksystems.AppEngineDataTypes"/>
Text
but also for Key
,
ShortBlob
, Blob
, Link
, User
.java.lang.ClassCastException: java.lang.String cannot be cast to com.google.appengine.api.datastore.Textor
An IncompatibleRemoteServiceException was thrown while processing this call.then it's probably because you didn't correctly include the jar files as mentioned in step 2 above.