Fork me on GitHub
#liberator
<
2016-08-09
>
rickmoynihan13:08:41

One thing I've found with liberator is that it's much more flexible to just (def my-resource { ,,,, }) as a map and defer constructing the resource until you wire it up with your routes etc... rather than use defresource. Curious if others have settled into this pattern too... and wondering whether the docs should downplay or perhaps even deprecate defresource

ordnungswidrig13:08:17

I use this all the time. defresource was a bad idea in the end but defxxx macros had been en vogue at that time.

rickmoynihan13:08:40

Yeah I remember 🙂 and we've all been guilty of writing our own brittle variants of defxxx... It would be good for the docs to eventually emphasise the map/data nature of resources... .that's the new vogue right? 🙂

rickmoynihan13:08:43

I think the current docs might encourage people to think of resources in the wrong way - a few weeks ago we went through a code base and removed all def'd resources and only def'd the maps... so we could make things more flexible