Principles of Fluent API Design by David Beaumont
ฝัง
- เผยแพร่เมื่อ 8 ก.พ. 2025
- In this talk I will draw from my experience at Google working with the Core Java Libraries team, and the lessons I have learned about designing Java APIs.
I've worked on the design of several core Java libraries at Google, including the Truth testing API and Flogger (Google's Java logging API) and in doing this I've built up a lot of experience with API design, and especially fluent APIs.
I will explain why Fluent APIs work well for a lot of Java libraries and what their general benefits are. I will also describe, with practical definitions, the difference between fluent APIs and other, similar looking, design patterns (chainable APIs, builders etc.). I will also describe some of the pitfalls and subtleties in designing a fluent API which can dramatically affect how useful and intuitive they are to people.