Philipp Hauer's Blog

Web Architecture, Java Ecosystem, Software Craftsmanship

Kotlin. The Java Ecosystem deserves this Language.

Posted on November 20th, 2016

kotlin-logo

We at Spreadshirt have started to use the JVM language Kotlin in a couple of services. This ended up in great enthusiasm. Kotlin allows us to significantly reduce the boilerplate and to write more robust and readable code. In fact, I don’t want to write Java anymore. In this post I like to show you why.

Improving your Continuous Integration Setup with Docker and GitLab-CI

Posted on October 11th, 2016

161009-ci-improvements

A typical Jenkins 1.0 setup for Continuous Integration (CI) comes with some drawbacks. The job configuration is stored somewhere else but not in the version control system. This makes it hard to set up a new job correctly or to track configuration changes. Another pain point are the various tools (JDK, Maven, node, gulp etc.) that have to be installed and maintained on all Jenkins nodes. This increases the maintenance effort and can slow down the development. Let’s consider some solutions for these issues.

I like Python! Concessions of a Java Developer

Posted on October 2nd, 2016

python-icon-crop

Developing with Python was a refreshing and pleasant experience. After working with Java for a while, you may forget how verbose and clumsy this language is sometimes. But Python shows how simple and powerful a programming language can be. Let me show you some examples.

How To Use UUIDs With Hibernate And MySQL

Posted on August 15th, 2016

160729-UUIDs-Featured-Image-small

Auto increment IDs are not working well when it comes to distributed databases. Instead, we should use UUIDs. Let’s consider the pros and cons of UUIDs and how we can use them with Hibernate and MySQL.

Version Numbers for Continuous Delivery with Maven and Docker

Posted on July 11th, 2016

160703-Versioning-Featured-Image

Dealing with version numbers is an important challenge on the way to Continuous Delivery. The classical versioning approach (“8.2.0”) and release workflow is inappropriate, because it can’t be automated properly. This post shows how we can leverage the Git commit hash to get rid of manual workflows and automate the Continuous Delivery pipeline. At the end, every build will produce an artifact which is potentially shippable. We’ll implement this solution with Maven and Docker.

Don’t Share Libraries among Microservices

Posted on April 17th, 2016

Sharing Libraries Among Microservices

Extracting common code to a library seems to be developer’s best practice. Reuse boosts the development, doesn’t it? However, in a microservice architecture shared libraries tightly couples microservices together. You lose a huge benefit of microservices: independence. In this post I like to point out why shared libraries are not a good idea and present alternatives.

Testing RESTful Services in Java: Best Practices

Posted on March 29th, 2016

Testing-REST-Featured-Image-Square

Testing RESTful Web Services can be cumbersome because you have to deal with low-level concerns which can make your tests verbose, hard to read and to maintain. Fortunately, there are libraries and best practices helping you to keep your integration tests concise, clean, decoupled and maintainable. This post covers those best practices.