Category Archives: GWT

Google Dev Day 2010 in Prague

Wow, Google Dev Day 2010 in Prague is over and there was lots of interesting information presented in the sessions. Below some notes I took during some of the sessions.

Native Client

  • Currently supported languages: C, C++. There are plans to extend the platform for other languages like C# and also to integrate with IDEs like Visual Studio and Eclipse.
  • Currently works reliably only in Google Chrome; can be used for extension development.
  • Possible use cases: client side encryption, image processing, games
  • Native Client is sandboxed in two layers: Native Client Sandbox, Google Chrome Sandbox.
  • Additionally certain IO and system calls are blocked.
  • Code must be verifiable, which has a size and performance impact.
  • http://code.google.com/p/nativeclient/

In my opinion Native Client probably won’t become popular in main stream applications, but I see a lot potential for Chrome Extensions.

What’s new in Google App Engine

  • AE for Business has been released recently. Main highlights are a Service Level Agreement and SQL support.
  • New features and API’s
    • Channel API: bidirectional client server communication.
    • Mapper API: Support for full MapReduce. Ideal for dealing with large datasets and distributable problems. App Engine Map Reduce.
    • Multi-Tenancy: Very easily usable by implementing a servlet filter and setting a namespace.
    • Matcher API: Document matching infrastructure.
    • High Performance Image Processing

All in all App Engine made a much more mature impression than last year. Together with SpringRoo, GWT and the Spring Source Tool Suite it’s a great environment for rapid application development …. if you are into Java …

Storage, Big Query, Prediction API

  • While App Engine is a Platform As A Service (PAAS) offering, Storage, BigQuery and Prediction API are the first products of Google’s Infrastructure As A Service (IAAS) offering.
  • Storage: essentially like Amazon S3. Compatible with S3′s REST API.
  • BigQuery and Prediction API builds on top of Storage
  • Data is stored in US data centers, but distributed through Google’s global network. Thus latency is very low.
  • Currently no Amazon-like areas are supported.
  • Comes with a command line util: gsutil. gsutil can be used together with S3, too.
  • Prediction API is an API to Google’s machine learning algorithms. Essentially you can upload a dataset to Google Storage, train the algorithm and then ask for a prediction based on a new input. The algorithms themselves are a blackbox; you don’t have any influence and no way to configure / fine tune them.
  • BigQuery: lets you query large datasets with a subset of SQL very quickly. Great for reporting.

Android News

New in Android 2.2

  • Licensing Verfication Library and Service
  • Application Error Reports (integrated into the market place, including the possibility for customers to provide feedback)
  • Just in time compiler: makes native apps 2x – 5x faster
  • Uses now V8 Javascript engine: makes web applications 2x – 3x faster
  • Device admin API: Enforcing enterprise Security Policies (e.g. max password length, etc)
  • Cloud to device messaging: Great for server push. Saves battery on the client side and provides a much better user experience.
  • App Data Backup API: Additionally to restoring the users apps on a new device, this gives the developer the opportunity to restore the users application data, too
  • Speech API
  • Easier configuration of “Install on SD”: simply configure this in your manifest file.
DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in Android, AppEngine, Cloud Computing, Conference, GWT | Leave a comment

Using GWT Canvas

One of the exciting new features of HTML5 is the Canvas element. Today evening I checked out two libraries implementing the Canvas element for the Google Web Toolkit.

I can’t really tell which library is better. Both seem to handle the Canvas API well. The biggest disadvantage at the moment is that you can’t run your code in hosted mode. The Incubator version promises that hosted mode works on Mac systems though. Users of other operating system will probably have to wait for OOPHM (Out Of Process Hosted Mode) which will be released along with GWT 2.0.
In my opinion one argument speaking for using the Incubator version is that this version is maintained directly by Google and that you get a lot more cool features by including the Incubator JAR.

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in GWT, HTML | Leave a comment

Frontend with GWT. What about the server side?

The past few weeks I’ve been playing around with the Google Web Toolkit and I’m pretty persuaded that it’s the best choice for implementing Rich Internet Applications. Google itself used it for the Google Waves front-end and for a complete re-write of the Google Adsense admin application. There are other companies out there using GWT in an enterprise environment ,e.g. Lombardi Blueprint.

How to communicate with the server?

GWT supports two ways to communicate with the server. The first is GWT-RPC which requires a Java server side because you need to implement a Servlet. Now this sounds more painful than it is. In fact it’s pretty straight forward. The really nice thing about it is, that you don’t have to think about serialization / deserialization of your objects. The Google Web Toolkit will take care of that.
The second approach is rather classical and that is to send and receive JSON or XML. Clearly this enables you to use whatever server side framework and that is great. The downside of this flexibility is that you have to take care of serialization by yourself. Luckily Ryan Dewsbury provided a code generator in his GWT Applications Book which automatically generates the serialization code for you. Check out the code on his webpage.

Ok cool, so that means I should take which framework?

There are so many web frameworks out there that it’s not hard to loose completely overview. For my personal preference I can narrow down the number of frameworks to consider to these two: Ruby on Rails and Grails, the Java web application framework based on the Groovy programming language.

Ruby on Rails is currently by far the most popular web application framework. What I really love about the framework is that you get all in one. A descend MVC architecture, Templates, easy REST, testability, database migrations, a very healthy and active community (which is really really important), Ruby, hundreds of plugins, you name it. The framework has gone through two major iterations and can be considered business ready. Companies like Thoughtworks generate a big part of their annual revenue with Ruby and Rails projects. There are great hosting companies (Engine Yard, BrightBox, Heroku to mention just a few), the deployment became much easier than in the early days and when it comes to performance you have a whole bunch of great choices to improve it (check out this series of screencasts).

Grails uses Groovy as language. Both Grails and Groovy look very similar to Rails and Ruby. Grails is still pretty young but I believe in the coming years we will see a lot more Grails applications. One reason for this is the very tight integration with Java. So are for example most valid Java programs also valid Groovy programs. This makes it really easy for Java developers to try it out. Also Grails builds up on proven Java technologies like Hibernate, SiteMesh and Spring. So though Grails might still have some quirks, the technologies underneath are out there for quite a while and used in thousands of applications. This also makes it easier to re-use existing code and infrastructure and sort of gradually move towards a more agile environment. It’s really made simple to use technologies like JMQ, JMX or libraries like Lucene.
Despite Grails is build upon things you know from JEE you don’t have to go through configuration hell. Grails puts Convention over Configuration and sets useful defaults just like Rails does.

Conclusion

Ruby on Rails is the original, it’s proven and you finally don’t have to worry any more about the Java technology stack. The only downside in terms of using GWT on the front-end is that you can’t use GWT-RPC.

Grails is great if you need to integrate with Java. Because of the big Java community we will see more talk about Grails in future. It’s also a good choice in combination with GWT. There’s a plugin for GWT and also AppEngine.

All in all I believe you don’t do anything from with either framework. It’s about personal preference. I’d like to see some performance comparison between GWT-RPC and the JSON/XML approach with generated serializer though. Your choice might be influenced by existing systems or libraries you have to use. This is true in both directions. With JRuby becoming a more and more mature Ruby implementation, Java integration is not anymore just a dream, although it’s not as tight as in Groovy / Grails.

Update:
Mastering Grails – Grails in the Enterprise
Proof of Concept : Learning Groovy, Grails, JRuby, and Rails

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in Grails, GWT, RubyOnRails | Leave a comment

GWT becomes more RESTful in 2.0 and gets PUT and DELETE

It might have been announced somewhere else already, but I read it first in this forum post:

REST : It’s maybe time to add Http methods PUT & DELETE

HI all,
The GWT team also agrees with you. See Issue #3388 (link below) to receive updates once the fix for this has shipped. It is currently planned for the GWT 2.0 release and is marked as a high priority fix.

Issue #3388

Cheers,
-Sumit Chandel

This is great news!

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in GWT | Leave a comment

GWT MVP example online

I already wrote about the great GWT Best Practices talk by Ray Ryan on the Google I/O.

Now there’s sample code for the Model View Presenter pattern online: http://code.google.com/p/gwt-mvp-sample/

DeliciousTwitterFacebookLinkedInRedditSlashdotTechnorati FavoritesDiggShare
Posted in GWT, Patterns | Leave a comment