I've been using GWT for over a month now at work. It really saves time when it comes to creating AJAX applications because it handles so much for you. For example, it can handle page transition and history very gracefully for you. It also has support for things like RPC and using JSON data.
However, if you are building an application that needs to be heavily styled, GWT might not be your best choice. First, the selection of GWT widgets are quite limited. Last time I checked, they only had 20ish standard widgets. Although there seem to be plenty of 3rd party widgets, I am unimpressed with their general quality and documentation. To make things worse, styling GWT widgets is a more complicated because not everything gets translated to native HTML tags. Some of the widgets are implemented as nested divs, and this certainly seems to make styling much harder. In general, the HTML output of GWT code is less clean than hand-coded HTML. At work, I had to take the style sheets made by the designer and try to apply them to the GWT-generated HTML and it was sort of a pain. I think part of the problem is that I'm not a web designer by any means. I had to basically (re)learn HTML and CSS. :/
In other news, course enrollment is tomorrow. I am currently pre-enrolled in CS 452: Real-time, but I don't know if I want to do it or not. The course load is ridiculous, but you learn a lot. If I do choose to take it, I would be able to take 4 courses that term thanks to Arts 304 this semester. Unfortunately, next semester in the only time I can take it for the rest of my academic career. :/
Showing posts with label GWT. Show all posts
Showing posts with label GWT. Show all posts
Monday, February 7, 2011
Wednesday, February 2, 2011
Pet Peeve #582: Bad Documentation
At work, I've been using GWT, and for the most part I've really enjoyed it. Occasionally though, I get frustrated by some things. For example AutoBean, a JSON-to-Java object parser for GWT, has almost no documentation. The Google Code wiki page is literal one of the only pieces of documentation out there, and it's quite bare. :/
Today I had to parse JSON lists using AutoBean. Here is the only relevant statement I was able to find:
No information on how to go the other. Not cool. I had to do a lot of experimenting to find out that AutoBean only accepts something like this right now:
Hopefully this will be improved for the next release.
Also, there were very few code examples online. Open source software can be really cool in that they provide a lot of really useful tools, but their lack of support is quite frustrating. This is not to say that all open source software has horrible documentation, but in my experience, it is usually worse than the Proprietary equivalents. Just take a look at MSDN vs Oracle's Java documentation. Thankfully, a co-worker helped me find a workaround that he had used in a different project.
Anyway, time to learn everything to there is to learn about Flash/AIR/ActionScript 3. Our J3WAO sprint ends tomorrow, and we still have a lot (all) of our development left to do. :P
Today I had to parse JSON lists using AutoBean. Here is the only relevant statement I was able to find:
List and Set properties are encoded as JSON lists. For example, a List<Person> would be encoded as:
[ { "name" : "John Doe" } , { "name" : "Jim Smith" }]
No information on how to go the other. Not cool. I had to do a lot of experimenting to find out that AutoBean only accepts something like this right now:
{ people=[ { "name" : "John Doe" } , { "name" : "Jim Smith" }]}Hopefully this will be improved for the next release.
Also, there were very few code examples online. Open source software can be really cool in that they provide a lot of really useful tools, but their lack of support is quite frustrating. This is not to say that all open source software has horrible documentation, but in my experience, it is usually worse than the Proprietary equivalents. Just take a look at MSDN vs Oracle's Java documentation. Thankfully, a co-worker helped me find a workaround that he had used in a different project.
Anyway, time to learn everything to there is to learn about Flash/AIR/ActionScript 3. Our J3WAO sprint ends tomorrow, and we still have a lot (all) of our development left to do. :P
Labels:
GWT,
J3WAO,
Open Source Software,
Web Development
Tuesday, January 11, 2011
GWT And Why It's Awesome
I am enjoying using GWT at work. GWT basically takes Java code and compiles it into AJAX-capable Javascript. GWT lets you use nice Eclipse features (like code completion and various wizards) and gives you a lot more compiler safety (like type safety).Of course if you want to handwrite some Javascript, you can do so using the Javascript Native Interface (JSNI). One particularly useful feature of GWT is AutoBean. AutoBean lets you automatically create Java objects from JSON input. It handles all the parsing details for you. :)
When you're ready to deploy, GWT will compile your Java into optimized, cross-browser(!) Javascript. It actually creates a separate version of the code for every browser, and then loads the correct one at runtime.
GWT is still quite young, so there are still a few bugs hiding. Today we found a (minor) bug that forced us to change our JSON format. Apparently, AutoBean doesn't handle '-'(dash) characters in JSON very well, even though it's a legal JSON character. GWT will try to create a Java/Javascript variable name with a '-' in it, and this causes parsing exceptions. I'll report this at some point soon.
Even with a few rough edges, GWT seems like it really accelerates web development. You should give it a try.
Subscribe to:
Posts (Atom)