Spring I/O 2017 - What it was really like

We just came back from beautiful Barcelona where the Spring I/O took place for the 6th time. Spring I/O is the leading European conference focused on the Spring Framework ecosystem. This year it was all about the upcoming Spring 5 and its support for reactive programming. This is a huge leap forward for Spring - so we were pretty excited to learn more about it.

Here are some of our highlights from this year’s edition in Spring I/O:

Database centric applications with Spring Boot and jOOQ

For a long time I had jOOQ on the list of frameworks I wanted to take a look at. So it came in handy that Michael Simons gave a talk about using it together with Spring Boot.

jOOQ is short for “Java object oriented querying” and describes a query builder framework that takes a look at your database schema, and provides you with a domain specific language (DSL) for generating statements.

Michael nicely showed where he sees room for jOOQ, even when already using Spring Data. Especially when writing complex queries jOOQ shines through its fluent DSL that allows to build type-safe queries.

The main use cases to apply jOOQ mentioned by Micheal are:

  • analytic functions (use the full power of your relational database)
  • UPSERT statements
  • partial selects (fetching parts of your entity for efficiency)

So next time you put a 10 line native SQL query into a String in your JPA repository, think twice and give jOOQ a try!

Reactive Spring

This talk was held on the second day of the conference. Josh Long and Mark Heckler gave an introduction to the reactive features in Spring 5 in a live-coding session. And everybody who ever attended a talk by (in)famous Josh Long knew what was coming.

Their talk gave a very good introduction about how Spring 5 is supporting reactive programming. It builds on Project Reactor to support message-driven, elastic, resilient, and responsive services. They showed how to expose reactive endpoints using the traditional annotated controller approach, but also the new functional way using RouterFunction and HandlerFunction. And as expected the talk was highly entertaining. I was not surprised that it ended up being the top-rated talk of Spring I/O 2017.

Functional web applications with Spring and Kotlin

One of the talks I most enjoyed was “Functional web applications with Spring and Kotlin” by Sébastien Deleuze.

In the first part of his talk Sébastien gave a short introduction to Kotlin. For me many language features looked familiar because of their similarity to Scala:

  • type inference
  • named parameters
  • default parameters
  • val vs. var
  • data classes

Sébastian made a convincing point that Kotlin is worth a try. It seems to add a lot of useful features in areas where Java is a little weak while keeping the good parts.

Kotlin is especially interesting for me (and maybe for my team in the future) because it seems to become a first class citizen in the Spring ecosystem - at least with Spring 5. So it is supposed to be quite easy to adopt while still using the full power of Spring Boot and Spring Cloud.

Starting to play around with Kotlin as a Spring developer is very easy - just head over to start.spring.io and select Kotlin from the language dropdown. I exactly did that after the talk and tried to explore Kotlin and the Spring 5 reactive features a bit. With the knowledge taken from the talk the start was really easy and I got first results running really quickly.

DDD Strategic Design with Spring Boot

In this talk, Michael Plöd exposed ideas and patterns around Strategic Design (one of the most important concepts behind Domain Driven Design) by using a Spring Boot Application as example.

Strategic Design identifies Bounded Contexts and Context Maps. Each bounded context contains models and maybe other (embedded) contexts. Context maps describe the contact or relationship between models/contexts.

There are context map patterns that can be identified:

  • Shared Kernel -two teams share a subset of the domain model-
  • Customer / Supplier -customer / supplier relationship between two teams. Downstream team is considered to be the customer-
  • Conformist -downstream team conforms to the model of the upstream team-
  • Anticorruption Layer -it isolates a client’s model from another system’s model by translation-
  • Separate Ways -no connection between the bounded contexts of a system-
  • Open/Host Service -each bounded context expose a set of services to other systems-
  • Published language -single agreed language to express models-

Here you can get the DDD Strategic Design with Spring Boot example shown by the presenter.

Bootiful Development with Spring Boot and Angular

That was a workshop presented by Matt Raible, developer advocate at Okta, a company that provides mobility, security and identity IT solutions.

This fast speaker showed us a beer recommender web service mounted as an Angular standalone client app making cross-origin requests to access a Spring Boot backend API (with Spring MVC and Spring Data REST technologies). Does this frontend/backend split sound familiar to you?

Get the Bootiful Development with Spring Boot and Angular workshop info and start coding.

It’s a wrap

Wrapping up, we can say that we very much enjoyed especially the second day of the conference. Spring I/O is a good place to go if you are relatively new in the Spring world and look for some orientation in this area. People experienced with Spring, Spring Boot and also Spring Cloud might come across a lot of already known topics.

And not to forget: Barcelona is a beautiful city that has a lot to offer beyond the content of the conference.

About the authors

Mathias Düsterhöft is a passionate Software Engineer with focus on Java and Kotlin, and a lot of experience in the Spring ecosystem. He loves open source and is the maintainer of restdocs-raml.
Juan Manuel Merino is a Software Engineer and Java enthusiast. He has a lot of experience in developing third-party connectors.