Settings

Theme

URI Templates, making and matching URIs in Clojure

juxt.pro

8 points by malcolmjuxt 2 years ago · 2 comments

Reader

malcolmjuxtOP 2 years ago

Hi, I'm the author of this article, and the original author of the bidi routing library in Clojure.

Recently, I discovered RFC 6570 and think it's a great basis for a URI router, especially given its designed for creating links too, which is useful in the context of building htmx (and other hypermedia) apps.

  • hrrld 2 years ago

    That's cool - we've used bidi for years on lots of projects and have always just built our links w/ string concatenation. Formalizing this more makes a lot of sense.

    With SPAs we've put a decent amount of thought into the tradeoffs between URI length, and putting enough context in each link to reconstitute the app state from a combination of local-storage, data requested from the server, and pure frontend db state (navigation location, parameters, etc...)

    Perhaps there's some connection here as well with datafy/nav, there are increasingly spaces where REST-ish graphs of data are arising and capitalizing on the formalism in reference/navigation with something like this seems like a good idea too.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection