Groovy
Welcome Daniel Sun to Apache Groovy PMC
The Apache Groovy PMC has invited Daniel Sun to join the PMC and he has accepted. You all probably know Daniel for his wonderful efforts on the Parrot parser but he has been contributing in many other areas as well recently. We look forward to many future contributions too! Welcome Daniel!
Congratulations @daniel_sun!.
Conferences & Events
GR8Conf - learn Micronaut, Grails, Groovy, Devops
Why should you or your team attend a conference? Because it is the perfect training opportunity. You will see dozens talks, attend a couple of workshops and come back to your workplace with ideas and a better perspective for making your software faster and more robust.
I have a discount code for Groovy Calamari readers. Use Subscribe ;-) to get 25% off.
I will be in Copenhagen at the end of the month and I hope to say hello to you in person.
Geb
Direct Downloading
I worked on a ticket for a client this week related to a scraper built with Geb. Geb method downloadBytes
is so genius.
Simple enough, but consider what is happening behind the scenes. Our application required us to log in, which implies some kind of session state. Geb is using HttpURLConnection to get the content and before doing so the cookies from the real browser are being transferred onto the connection allowing it to reuse the same session. The PDF download link href may also be relative, and Geb handles this by resolving the link passed to the download function against the browser’s current page URL.
Micronaut
Release Micronaut 1.1.1
If you are in the 1.1.x branch of Micronaut,, upgrade to this patch release.
Google Cloud Run with Micronaut and GraalVM
This is a real example of Micronaut + GraalVM in production.
Java is the language I know the best, but its reputation in the lightweight container (or dare I say microservice) space is not the best when compared to a natively compiled language like Go.
The requirement to be lightweight and nimble while still using Java is why the Micronaut framework and GraalVM have perked my interest. GraalVM can compile a Java application down to a native executable and the Micronaut framework includes out of the box support for compiling to such a native image (so no messing around needed)
Micronaut PetClinic
Keep the Spring comparisons coming:
I tried implementing Spring PetClinic with Micronaut instead of using Spring.
...
The application uses Thymeleaf, JPA(Hibernate) and DI. But it starts in a few hundreds of millis with GraalVM native image. It's so fast!
Tools
Introduction to JSON Schema
I am working on a big project with microservices written in different languages. We are exposing Open API and JSON Schema definitions as contracts between each service. What DTD is for XML, JSON Schema is for JSON:
JSON Schema is a declarative language for validating the format and structure of a JSON Object. It allows us to specify the number of special primitives to describe exactly what a valid JSON Object will look like.
OpenAPI 3.0: How to Design and Document APIs with the Latest OpenAPI Specification
Do you know the difference between Swagger and Open API? This webinar solves those doubts and, via a step by step example, defines with an OPEN API yaml definition the typical CRUD API.
Comment
This issue is a total mix: GR8Conf EU, new Apache Groovy PMC, Open API, JSON Schema, Micronaut 1.1.1, Geb
downloadBytes
, GraalVM.Enjoy!
Sergio del Amo