J-Spring 2024: Future-Proofing Java: The Art of Crafting Resilient APIs – Steve Poole
Designing APIs is an art, a creative exercise. Getting it right for right now is hard, getting it right for tomorrow is even harder. This talk explores designing resilient Java APIs for upward compatibility, consumability, and flexibility. We’ll discuss the practicalities of ideas like encapsulation and inheritance, look at wider elements like consistency, and effective communication of intent, and cover concepts like the Open-Closed Principle, Semantic Versioning, and other elements that are essential for seamless API evolution. We’ll review real-world examples, Java gotchas, the latest Java API capabilities, API Check tools, and data and take a look at what Maven Central tells us about the challenge we all face (and just how good we collectively are) Amazingly, good API design not only helps with evolivng for the future, it make the API more secure and reduces maintenance overheads – all while remaining flexible and consumable. Time to break those bad design habits before they begin.