HTML5, GWT, Sencha GTX, WebSocket, STOMP
Writing rich web applications has become easy with numerous GUI framework choices available in the market and from community. Each framework has something good to offer. We have invested in developing applications using Flex 4.7 and we got amazing results. We were particularly happy with its flexibility to customize controls, define a class using action script or write an mxml code like any scripting language. We could use flex to talk to messaging broker in place of RESTful Apis to ensure we are developing highly scalable web applications.
However, not all our customers have requirement to heavily customize their applications. In such scenarios it made lot of sense to use GUI framework that has great performance with rich library of flexible controls. We explored a few, and found Sencha GTX which was relatively more mature and was built on top of Google’s GWT tool kit. The best part of GWT is that it allows developers to program in Java programming language, rest is taken care by Google’s tool kit engine. This allowed our engineers to quickly ramp up for developing rich applications. While we resolved one set of problems we still had challenges in terms of how to make it speak to a messaging broker.
We managed to get around this by using HTML5 WebSocket feature using JavaScript. This allowed us to connect to message broker. This particularly allowed us to leave our server code unmodified. There was still one last challenge of integrating JavaScript with Google’s GWT and/or Sencha GTX. GWT compiler compiles Java code to Javascript, so we used its JSNI feature to plugin in code snippet into a method using “native” keyword.