Groovy
Practical and Stupidly Impractical Groovy DSLs
@craigburke1 shows why Groovy shines to build Domain Specific Languages (DSLs):
- Groovy Simple Syntax (Command Channing, Optional Parenthesis, Named Arguments)
- Operation Overloading
- Scripting support
- Meta Programming ( Dynamic properties, Dynamic methods ...)
- Closure Delegation
Spock
Intro to Spock and Geb
Nice intro by @craigatk1 to Spock and Geb at GR8Conf US. Slides provide great examples plus they are full of links to go deeper.
Moreover, I learned about about Setup / Cleanup Inheritance in Spock
Gradle
Testing Gradle Plugins
@andrewreitz_ shows how to test a Gradle Plugin. As the maintainer of the Groovy Android Plugin, probably nobody like him to explain about this topic.
An Android Gradle plugin has to deal with multiple combinations (Gradle Version, Java Version, Android Build Tools version)🙆🏼. He shows several tips and tricks to go about it.
Ratpack
Testing Ratpack Applications
Another presentation by @LSpacewalker supported by great Asciidoc documentation.
Learn how to do in Ratpack:
- Unit Testing
- Http Client Testing ( http verbs, headers, cookies)
- Async testing
- Functional teting
Android / iOS
Better Android Development with Kotlin and Gradle
In GR8Conf EU, @kenkousen spoke about fighting reality vs perception around Groovy. Check out the third slide in this Kotlin talk:
Reasons why Groovy is not a good fit for Android development:
How about Groovy?
• Groovy is dynamic
• Harder for IDEs to parse and infer
• Won't ever be consistent with Android
Harder for IDEs to parse and infer -> Specially vs a language developed by an IDE manufacturer
Groovy is dynamic ->@CompileStatic anyone?
Won't ever be consistent with Android -> WTF?
That said. Kotlin looks good and Swift syntax resembles Kotlin's syntax a lot. That will probably help the creation of multi-platform development teams coding in Swift for iOS and Kotlin for Android.
Libraries
Spring Cloud Contract
Back in Issue 29, I pointed to the Accurest project a Consumer Driven Contracts verifier for Java.
The project has been deprecated and it has reincarnated as Spring Cloud Contract
This project provides support for Consumer Driven Contracts and service schemas in Spring applications, covering a range of options for writing tests, publishing them as assets, asserting that a contract is kept by producers and consumers, for HTTP and message-based interactions.
This link goes to the documentation, you may want to check the Github repo too.
Our company REST Api is powered by a Grails 3 App. Since any Grails 3 app is a Spring Boot app I could use this project to generated a contract. I need to check the documentation more but If I am able to generate a contract and enforce it in our Java Android App (our client side) it will make things more stable for us.
Comment
About to head to the beach 🏄 but I am still reading GR8Conf US goodies. This is probably one of the few issues I have written so far without Grails links. However, there is good Ratpack, Spock, Gradle, Groovy material. It is a rich ecosystem indeed.
Groovy Calamari