Sunday, July 08, 2007

Playing around with Google Web Toolkit (GWT)

I've been playing around with the Google Web Toolkit (GWT). To learn it, I wrote a chess game. There's no server component; everything's on the client. With GWT, what that means is that all the code is in Java, and then "compiled" into JavaScript.


Blogger Matt Dowell said...

That's really cool. Did you you an existing chess utility to analyze the moves, or come up with your own?

July 8, 2007 at 2:46 PM  
Blogger Kevin said...

I wrote the model representing the board and pieces and rules for legal moves. One cool thing is that (since the model doesn't know anything about the GWT view code) the model could exist on either the client (in compiled Javascript) or the server (in Java), and making the change would be really easy. It could even depend on whether the user was connected, like Google Gears.

(By the way, if you hadn't noticed, black's moves are just random).

July 8, 2007 at 3:24 PM  
Blogger Matt Dowell said...

Ah.. funny, that explains why I won. The scary part is, I barely won.

July 10, 2007 at 10:56 AM  
Anonymous xrellix said...

Nice stuff kev..

July 24, 2007 at 1:13 PM  

Post a Comment

<< Home