ring

seancorfield 2024-08-08T21:09:11.630659Z

I'm creating a fork/variant of ring-clojure/ring-json that uses org.clojure/data.json instead of Cheshire, to get away from the dependency hell of Jackson. I'll publish it under com.github.seancorfield/ring-data-json, in line with several of my other projects (and, note, it'll be ring-data-json rather than ring-json). Question: what is the etiquette around nses for non-`ring-clojure` middleware? I was going to use ring.middleware.data-json to distinguish it from ring.middleware.json but then realized ring.middleware.* might be conventionally "reserved" for Ring itself...?

🎉 1
seancorfield 2024-08-08T21:11:38.570039Z

ring-cors is widely used and uses ring.middleware.cors: https://github.com/r0man/ring-cors/blob/master/src/ring/middleware/cors.cljc

seancorfield 2024-08-08T21:19:40.622369Z

Looking across GitHub for Ring Middleware, the majority seem to use ring.middleware.* although I'm also finding quite a few that use something else...

wevrem 2024-08-08T21:20:14.748229Z

I looked through my project: reitit provides some ring middleware under the ns reitit.ring.middleware.

2024-08-08T22:02:38.852049Z

while it is hard to argue against what everyone is already doing (using ring.middleware.*) I think that kind of thing is really bad. namespace names should reflect a name you have some ownership of

âž• 1
seancorfield 2024-08-09T01:24:49.127439Z

Yeah, I was surprised so many third party libs used ring.middleware.* -- by the time I actually release this new data.json-based version, I'll switch to something else.