rozzamozza 17/04/2007 - 09:53
To take advantage of new AJAX functionality and the usability improvements this gives, I thought I would try out Google Web Toolkit
for a web based reporting tool I was using.
The idea looks sound.
- Develop your Junit tests and code in java in a professional IDE such as Intellij or Eclipse.
- This then runs on any client.
GWT comes with most of the Swing like components you will need so it is quite easy to modify their examples to get smething neet that works.
Issues I faced..
1. As with immature software the "Happy path" for the code you are doing works well. The problem comes if you make some mistake. The error message you get is not intuitive.
E.g. For my remote connection to the server I made the mistake of writing
service = (ReportServiceAsync) GWT.create(ReportService.class);
service = (ReportServiceAsync) GWT.create(ReportServiceAsync.class);
The error you get is the following...
java.lang.RuntimeException: Failed to get JNode
2. You start writing tests and great it all works and you get a nifty app. Then you find some layout problem that no matter what setting you change (E.g. setWidth("100%")) you cannot get the layout correct. Not being able to debug of see the actual html layout that is generated by GWT is scarey...so you have to find another way to do things. The feedback time after compiling can make this a long process to fix very simple things.
3. Not all Junit tests will run. Thats because items (such as GWTs Grid class) use native libraries to perform their operations. I am currently working through this to see how I can run all my tests in Intellij
4. I can't get GWT TestCase to work. The error I get is Unable to find 'reporting.gwt.xml' on your classpath. Turns out I need the full path to it which is I guess understandable...
Now I am stuck with this...
[ERROR] Unable to find type 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest'
[ERROR] Hint: Check that the type name 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest' is really what you meant
[ERROR] Hint: Check that your classpath includes all required source roots
[ERROR] Deferred binding failed for 'com.rozzamozza.inference.reporting.client.reports.GWTTableTest'; expect subsequent failures
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)