~/talk

Modern Java API Design

Talkat Jfokus 2021 · on Tuesday, 2021-02-09· [java, api-design]
links:none on file
slides:none on file

Covers practical rules for Java library APIs: use consistent return types (Optional, empty collections, Stream.empty), keep parameter order or introduce an options/arguments type to avoid telescoping, prefer final and package-private for evolvability, avoid leaking third‑party types, and add tooling (custom checkstyle rules) to block implementation packages from becoming public. Notes sealed classes (JEP 360 preview in JDK 15) as a future API control, cites Azure SDK for Java as a real-world implementation and urges moving beyond Java 8 to Java 11+.

AI-written summary · about

  1. 0:00Introduction to API design
  2. 3:04What defines a good API
  3. 4:46Importance of consistency
  4. 5:59Handling return types
  5. 7:20Method naming conventions
  6. 8:47Parameter ordering and design
  7. 10:42Restraint in feature design
  8. 14:21Using access modifiers
  9. 16:02Hiding implementation details
  10. 18:54Using sealed classes
  11. 20:15Developer empathy
  12. 21:02Documentation best practices
  13. 23:12Moving beyond Java 8
  14. 24:26Conclusion and resources
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.