~/talk

The Good, the Bad and the Ugly of Java API Design

Talkat Devnexus 2020 · 2020-02-19..02-21· [java]
github:mcupak
slides:none on file

Live coding with JShell demonstrates concrete API replacements added in Java 9–11: concise immutable factories (List.of / Set.of / Map.of and copyOf plus collectors), lazy stack access with StackWalker.walk (can retain class references and limit frames), process management via ProcessHandle (PID, info, pipelines and onExit returning CompletableFuture), and the HTTP/2 client (HttpClient/HttpRequest/HttpResponse with sendAsync). Examples run locally — server and client exchange a response, pipelines and onExit callbacks print PIDs as shown.

AI-written summary · about

  1. 0:00Start
  2. 1:37Collections Api
  3. 4:02Java 9 Introduces New Factory Methods
  4. 6:11Instance Initializer Construct
  5. 7:31External Library
  6. 8:22Copy Constructor
  7. 11:01Copy Problem
  8. 11:44Collectors to Immutable Collections
  9. 15:35Practice To Create Immutable Objects by Default
  10. 17:25Stack Walker Api
  11. 20:11Avoid Hidden Behavior
  12. 20:21Patterns
  13. 20:35Choose the Right Data Structures and Object Representations
  14. 22:06The Process Api
  15. 23:06Problem with the Process Builder Api
  16. 25:43Process Handle
  17. 26:57Triggering Actions on Process Termination
  18. 27:08Process Builder
  19. 30:15Process Handle Interface
  20. 30:43Antipatterns
  21. 33:43New Http 2 Client from Java 11
  22. 36:48The Http Url Connection
  23. 37:38Runtime Cast
  24. 38:01Check the Status Code
  25. 39:31Apache Http Client
  26. 43:34Recap
  27. 44:30Inconsistent Capitalization
  28. 47:04Mandatory Blocking I / O
  29. 48:43Patterns That Are Nice in the New Api
~/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.