-
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…
-
log.rofl(‘Fun with Groovy metaprogramming’)
Recently I saw a post by someone (I think it was @jbarnette, but it was retweeted to me) suggesting that there should be some alternate log levels, like fyi, omg, or even wtf. I thought that was pretty funny, but then it occurred to me I could probably implement them using Groovy metaprogramming. As a…
-
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…
-
Converting Groovy maps to query strings
Yesterday I was teaching a class on Groovy when I suddenly realized there was a simpler way to do something I’d been doing for years. I like showing developers how easy it is to access RESTful web services with just a couple of lines of Groovy. The process is particularly simple if all you need…
-
Groovy “tutorial” chapters added to Making Java Groovy
One of the lessons I learned during the first 1/3 review of Making Java Groovy is there are two kinds of developers interested in the book: those who already know both Groovy and Java, and those who are only comfortable with Java. The goal all along has been to show how Groovy and Java can…
-
I think I get Spock Mocks now
I’ve been misunderstanding a fundamental issue of Spock Mocks. That’s annoying, but probably inevitable given that I work with so many state-of-the-art, evolving API’s. If you spend enough time on the bleeding edge, sooner or later you’ll get cut. The problem is, though, I’ve been telling people something wrong for some time now, and that’s…
-
Cool Groovy aspect in Spring
I’ve been teaching a lot of Spring framework classes lately. In one of them, we have a unit on Aspect Oriented Program (AOP) in Spring. Spring provides all the necessary infrastructure to make AOP doable. You can define aspects using annotations, and Spring will auto-generate the necessary proxies to implement them. As an example, the…
-
SOAP Web Services chapter added to MEAP
I just added a new chapter discussing Groovy and SOAP-based web services to the Manning Early Access Program (MEAP) version of Making Java Groovy. I prepared a decent introduction for the MEAP subscribers, which I thought I would share here: “Though they’ve fallen out of favor recently, SOAP-based web services provide a perfect opportunity for…