On Thursday, October 20, 2016 at 7:19:05 PM UTC+1, John Kelly wrote: > > I'm sorry to link drop, but I've been doing a bit of work on a library to > remove some of the boilerplate when writing client code for a REST API. The > library is currently locked in / specific to what is called PostgREST, but > I imagine that the patterns could be applied to any REST backend. Check it > out: https://github.com/john-kelly/elm-postgrest/ > <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fjohn-kelly%2Felm-postgrest%2F&sa=D&sntz=1&usg=AFQjCNHTva6uU9xOQp25SAfSH2dhe8MoMA> > > > The core idea is to remove the boilerplate of always having to define > encoder, decoder and schema. Would love to chat. >
Seems like a fairly nice idea - you provide functions like 'string', 'int' to construct the 'Fields' which are self contained in the sense that they provide the Decoder and the name of the field. Mostly field names will match record fields, but sometimes they might not, so having an ability to name them differently to the name of the field in the Elm record could be useful. I also quite like the little DSL you provide for field projection, filtering and sorting records. In some cases an API might already do that for you, but convenient to have this facility on the client side. I can see that coming in handy for fancy data tables for example. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
