Issue #1: Browsers are slow.
To help with the speed problem I implemented three main features in the solver.
Block aliasing. If two unimportant identical blocks swap places, then that should not count as a new state to evaluate. Duplicate state elimination. Two states that are identical must not be re-evaluated. A-star (A) state sorting. Using A only provides a small improvement (about 10%) because block paths are always cluttered.
Issue #2: Browsers are silly.
The other benefit to having threads is the obvious computational benefit, a block solver could be parallelized pretty easily.
Issue #3: No image manipulation/creation API in browers.
The obvious answer is that the block images are downloaded. We generate a URL that contains hue, saturation and value of the desired block that we wish to display. The browser dynamically issues an image request for the next block color to be used. On the server the url is processed as a php script that generates the proper color block using ImageMagick.
Issue #4: No Drag and Drop in GWT
The GWT core has no native support for drag and drop. This really perplexes me that GWT does not include any sort of drag and drop functionality. It seems to be a vital component of any interactive application.
However, there is an excellent third party library called gwt-dnd. The latest version of this library is written against the beta version of GWT. This ending up costing me a lot of time because I got stuck with an IE bug that ended up taking hours to solve.
Update: The IE bug was solved instantly after I reported it. The fix is included in release 2.5.4 (Currently a release candidate).
Overall Assessment of GWT
I really like GWT.
- The core library is actually very well debugged and extremely usable and complete.
- It works as advertised.
- It aspires to greatness and is slowly crawling toward it.
- It would work extremely well for AJAX sites.
- There are, however, the aforementioned looming problems. Of those, only issue #4 can ever really be resolved. Therefore it is currently the wrong tool for computation and fluid interactivity. A regular applet or flash would be superior for these kinds of tasks, however I’m optimistic that gwt will continue to get better.