Super happy to see Pedestal getting upgraded to Jetty 12, and all the goodness. Many thanks @hlship!
I was curious in the past in if/how I could leverage Spring/Spring Boot components in a Clojure application. For a lot of use-cases there's already some Spring plug-in, it seems like a shame to have to re-implement everything in Clojure. But, when I tried to look into it, I was completely lost (I've never used Spring)
If you dig around in the Spring code, you might find some quasi-functional code for the stuff you are interested in that can be invoked from Pedestal's interceptor model. Maybe. It's just hard to bind together Clojure code (immutable data, functional style) with Java code (mutation everywhere). Java just feels like chaos to me now.
Components in the spring ecosystem are quite strongly coupled, in the sense that it is hard to just use one piece without dragging in much of the rest. And as an added bonus it is annotation driven, which I don’t think works very well with Clojure? I think Spring is trying to do too much, and for that reason implementing the functionality in a more targeted and decoupled way with Clojure leads to something simpler, both from the implementation and the user perspective.
Yeah that's a shame - sometimes relying on a widely used library makes sense, esp. with security or interop in mind. But it's a PITA with the annotations and the magic build-steps.
What kind of things did you have to reimplement?
I was looking into eg a SAML implementation. I was hoping I could plug something using the servlet API but it seems it’s very coarse
I understand that pedestal is moving away from the servlet API since it’s just an implementation detail at this point. I’m not at all experienced with that so I’m only guessing at possibilities though.
Just need to reiterate “SSE = winning” 😁