I’ve asked this before…as well as hunted for more info… outside of interceptors can you tell some of the more inexperienced developers ‘me’ where pedestal shines over ring?
Basically, the primary advantage of Pedestal is the simple, data-oriented approach vs. Ring's separate router + middleware (= function decorator) approach. This adds a lot of flexibility to dynamically inspect your web service code during runtime, allowing you do to stuff like what I describe in my second comment which wouldn't be possible in Ring.
So based on SAML assertions about the user (returned from an external service after login), routes are dynamically tested while generating e.g. this basic page and links are either crossed over or not based on the authorization level of the user. The routes are looked up using the router which is fetched out of the interceptor context, making the whole thing entirely decoupled and reusable in other contexts.
I set the required authorization at the route level in my router exactly once per route and then I can call permit-request? from anywhere, with no knowledge of router or the SAML code. It really simplified authorization for me to be able to inspect and run the router in this super decoupled way. And it is highly efficient, both in terms of lines of code and computationally.
2
u/SimonGray Aug 28 '21
Where's Pedestal?