Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
URI Templates, making and matching URIs in Clojure (juxt.pro)
8 points by malcolmjuxt on Feb 15, 2024 | hide | past | favorite | 2 comments


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.


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.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: