Tag: Groovy
-
Elvis carried away by spaceships
I love teaching Groovy to existing Java developers, because they have such a hard time holding back Tears Of Joy when they see how much easier life can be. Today, though, I did a quick demo that resulted in a line of Groovy that was so amusing I had to post it here. Consider a…
-
Groovy StubFor magic
I finished revising the testing chapter in Making Java Groovy (the MEAP should be updated this week), but before I leave it entirely, I want to mention a Groovy capability that is both cool and easy to use. Cool isn’t the right word, actually. I have to say that even after years of working with…
-
GroovyShellTestCase for testing Groovy scripts
I try to keep up with developments in the Groovy and Grails worlds. I really do. I follow most of the core team members on Twitter. I listen to the Grails Podcast when I can. I go to many conferences and attend other talks when I’m not speaking. I try to follow the email lists,…
-
Up and Running Groovy: An O’Reilly screencast for my Manning book (wait, what?)
Way back in the Spring of 2009, I was contacted by an editor at O’Reilly about doing a couple of “targeted video/screencasts”. This person (who is no longer there — I’d give you his name but I haven’t asked his permission yet) had the idea of getting people together in an informal setting and talking…
-
Making Swing Groovy, Part III: EDT
In this entry in my “Making Swing Groovy” series, I want to talk about threading issues. Specifically, how to work with the Event Dispatch Thread. As a step along the way, let me first respond to a comment made about my first post in this series. Kirill Grouchnikov collects interesting Swing-related links every week. He…
-
Making Swing Groovy, Part II: Binding
In my previous post in this series, I presented a trivial Echo GUI written in Groovy. By using SwingBuilder and closures, the code for the GUI was dramatically simplified compared to the Java version. But Groovy can go beyond that. In this post, I’ll talk about the bind method and the @Bindable annotation, which help…
-
Making Swing Groovy, Part I
I’ve been spending a lot of time lately trying to understand how much Groovy improves Swing user interfaces. Like so many Java developers, I rarely write client-side programs. Almost all of my time and effort with Java over at least the last five years has been on the server side, mostly with frameworks like Struts,…
-
Getting a list of Grails plugins programmatically
In September, I’m very happy to be giving a couple of presentations at the No Fluff, Just Stuff conference in the Boston area. One of my presentations is a review of the various available Grails plugins. To prepare for that, I thought I’d create a Grails application that acted as a survey, so people could…
-
assert != assertEquals (duh)
It’s probably not great for my reputation to show how I made a very silly error, but since I did it so consistently I thought showing it might help somebody avoid it. My Groovy course materials consist of far more scripts than classes. That’s probably not surprising, given that teaching Groovy involves writing lots and…
-
Using Groovy to determine Unicode characters
(Technically speaking, this post doesn’t require Groovy. You could do the same thing in Java. Still, as usual, Groovy is easier.) I’m teaching a Groovy course this week and having a great time doing it. One of the exercises I put together is to create a concordance, which is a map relating individual words to…