Do Not Make This Mistake When Developing an SPI

Most of your code is private, internal, proprietary, and will never be exposed to public. If that's the case, you can relax - you can refactor all of your mistakes, including those that incur breaking API changes. If you're maintining public API, however, that's not the case. If you're maintaining public SPI (Service Provider Interfaces), … Continue reading Do Not Make This Mistake When Developing an SPI

You Will Regret Applying Overloading with Lambdas!

Writing good APIs is hard. Extremely hard. You have to think of an incredible amount of things if you want your users to love your API. You have to find the right balance between: Usefulness Usability Backward compatibility Forward compatibility We've blogged about this topic before, in our article: How to Design a Good, Regular … Continue reading You Will Regret Applying Overloading with Lambdas!

How Nashorn Impacts API Evolution on a New Level

Following our previous article about how to use jOOQ with Java 8 and Nashorn, one of our users discovered a flaw in using the jOOQ API as discussed here on the user group. In essence, the flaw can be summarised like so: Java code package org.jooq.nashorn.test; public class API { public static void test(String string) … Continue reading How Nashorn Impacts API Evolution on a New Level

10 Subtle Best Practices when Coding Java

This is a list of 10 best practices that are more subtle than your average Josh Bloch Effective Java rule. While Josh Bloch's list is very easy to learn and concerns everyday situations, this list here contains less common situations involving API / SPI design that may have a big effect nontheless. I have encountered … Continue reading 10 Subtle Best Practices when Coding Java

Defensive API evolution with Java interfaces

API evolution is something absolutely non-trivial. Something that only few have to deal with. Most of us work on internal, proprietary APIs every day. Modern IDEs ship with awesome tooling to factor out, rename, pull up, push down, indirect, delegate, infer, generalise our code artefacts. These tools make refactoring our internal APIs a piece of … Continue reading Defensive API evolution with Java interfaces