Ramblings of a Java developer and OSS fanatic

Java RPC Dead in the REST Age? Neh!

When you’re writing webservices nowadays, you can be sure without a doubt that REST will be your first choice and probably your only choice. However, those familiar with REST services also know how hard it is to sometimes map all your business concepts to resources. Sometimes you just need to quickly build something RPC-like that can be invoked with a simple HTTP call and uses JSON like all the cool kids on the block. Enter JSON-RPC.

Small Spring Boot Jars With Capsule

Those familiar with Spring Boot already know that Spring Boot applications can result in quite large jar or war files. In most cases, this is a not an issue, but often between versions you’re essentially only touching maybe 5% of the entire size of the jars, while the other 95% consist of dependencies which haven’t changed. This is the concept of a fat jar. However, with the 1.0.0 release of Capsule, this might change.

Testing Generic REST APIs With RAML

In an earlier post I showed you how to create contract-driven REST services using RAML as a specification framework. However, the RAML tester library does not limit itself to being able to test Spring MVC controllers. You can also use it to test any REST API and check whether it adheres to a RAML specification.

Using JAX-RS With Spring Boot Instead of MVC

Spring users that frequently write REST APIs are very familiar with the Spring MVC REST support to write their endpoints. Java EE users however are more accustomed to the JAX-RS specification. It’s however really easy to integrate JAX-RS into Spring applications, especially Spring Boot applications.

JDBI, a Nice Spring JDBC Alternative

Recently I was researching some more Java EE-like alternatives for Spring Boot, such as WildFly Swarm and Dropwizard. And while looking at Dropwizard, I noticed they were using a library for JDBC access I hadn’t encountered before: JDBI. Normally, my first response to plain JDBC access is using the JdbcTemplate class Spring provides, but lately I’ve been having some small issues with it (for example it not being able to handle getting the generated keys for a batch insert in an easy way). I’m always interested in giving other solutions a try so I started a small PoC project with JDBI. And I was pleasantly suprised.