~/talk

REST in peace: using generics to remove REST boilerplate

Talkat GoLab 2023 · 2023-11-19..11-21· [web-platform, typescript]
slides:none on file

Generics power a small Go library that generates CRUD HTTP endpoints from a typed provider: register rip.ResourceProvider[MyResource] and call rip.HandleResource[MyResource] to get GET/POST/PUT/DELETE plus content negotiation (JSON, XML, MessagePack, HTML). An EntityProvider interface exposes Create/Get/Update/Delete/List using real types; demo uses an in-memory provider and HTMX UI. Library registers encoders via init, lacks robust error handling, pagination, nested resources and partial-update semantics, and acknowledges some generic-vs-any performance tradeoffs.

AI-written summary · about

  1. 0:00Introduction and background
  2. 5:47The problem with boilerplate
  3. 8:00Empty interface challenges
  4. 11:10Leveraging Go generics
  5. 13:58The Rip framework approach
  6. 19:06Resource handling implementation
  7. 23:24Framework demo and UI
  8. 29:47Future goals and community
  9. 34:23Q&A session
~/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.