Category: Groovy
-
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…
-
Testing Groovy Scripts
I often start Groovy development with scripts rather than classes. Scripts are quick and easy, both to write and to run, and the feeling of having only a few lines of code makes me more willing to experiment. Most of my scripts eventually turn into classes, but once in a while, either for convenience or…
-
Groovy Groundhogs (again)
Last year on Groundhog Day I posted a short Groovy script about the consequences of the groundhog seeing his shadow. I wasn’t going to do it again, but then I thought about the movie and realized I had to. Here’s the script, which I’ll explain afterwards. [sourcecode language=”groovy”] println ‘Groundhog sees shadow –> 6 more…
-
An easier way to add Spock to an Eclipse/STS project
Normally I’m a big fan of Mr. Haki and his blog posts about Groovy. Recently, however, he wrote a blog post entitled Spocklight: Add Spock Support to Java Project in STS/Eclipse in which he accomplished his goal in what I find to be an overly complicated way. I’d like to suggest a much simpler alternative…
-
What is “Making Java Groovy”, anyway?
This week, the first two chapters of my book Making Java Groovy became available through the Manning Early Access Program (MEAP). I thought I’d explain a bit more about the purpose of the book here, while potential readers still have a chance to affect it. Also, this post is an attempt to answer the question,…
-
The Rest Can Wait
This month, my son’s band, The Tension, released their first CD, entitled “The Rest Can Wait“. It’s currently available at CDBaby, and will eventually be on iTunes, Amazon, etc. I love the album, but since I’m the lead singer’s father, it’s natural to think I might be biased. So there’s not much point in me…
-
Twitter Follower Value, revisited
In my last post, I presented a Groovy class for computing Twitter Follower Value (TFV), based on Nat Dunn’s definition of the term (number of followers / number of friends). That worked just fine. Then I moved on to calculating Total Twitter Follower Value (TTFV), which sums the TFV’s of all your followers. My solution…