Tuesday, December 20, 2011

Migration to GWT


It has been 2 weeks now since I have been studying Google GWT in my free time. To add Google GWT in my resume as a skill , I have planned to convert one of my application's page into a GWT application code. 
There are many challenges which I am facing currently few of which I would list down. These are daunting and seem showstopper as of now. I hope to solve these as the days progress. 

When developing my Web-application the area of focus will be the following


  1. Multi-language support for the Web site. I18N Support 
  2. Using Geographically distributed server to host static content of the webpage - this to improve the Web Page loading times across various regions. ( How to achieve this ? )
  3. Low development life cycle ( important when you have Agile Methodology )
  4. Ease in moving to any other Web Frameworks. Currently Google GWT has a MVP framework guideline which affirms that using this framework its easier to move to any other Framework in future
  5. Learning curve to learn the new Web Framework 
  6. CSS/jQuery/JavaScript Support ( As per the documents on GWT you can insert your own jQuery and JavaScript , however I have not tried them yet)
  7. Ease of Deployment to the web application server 
  8. Any issues faced while integrating to the Web Application Server ( Oracle Weblogic / Apache Tomacat )
  9. Actual Performance gain when compared to existing Web Framework on which my Web application has been written 
  10. Out of the box solution - meaning how easy it is to create Web Page components like Stylized Tables , Pop-up panels,Scrollable Tables , Pagination etc . There will be obvious comparison with the existing Web Framework ( RichFaces and JSF). SmartGWT is a third party Widget library which provides Widgets like Rich Faces. It comes in Enterprise Edition and Basic Free Version. This has to be evaluated and checked how do they attach to my Web Application.
I will be keep updating the blog with the problems faced and how I have fixed it 

The challenges right now being faced are 

1. How to call a External Webservice when running the application on the Google App Engine ?
       I have tried both JAX-WS based ( java.net.ProxySelector as a restricted class) and AXIS2 Client (java.net.Socket as a restricted class) and I stumbled upon roadblocks. 


Solution : 


This issue is solved by adding your version of  the com.google.apphosting.runtime.security.WhiteList in the Google GWT Web Project under the same prackage name as the original class from the jar*. Add the following packages to the whiteList  Collection Set defined in this class.


*This class is located in the jar file appengine-agentImpl.jar. 


javax.net.SocketFactory 
javax.net.ssl.SSLSocketFactory
java.net.Socket
java.net.ProxySelector 

2. How to call a HTTPS Webservice when the application is hosted on Google App Engine ? 


Solution


Just add the certificate of the HTTPS webservice to keystore file - cacerts located under the Sun JRE/lib/security folder.