Would Liberator be a good choice for our first Clojure web API project?

55 views
Skip to first unread message

Jonathon McKitrick

unread,
Mar 8, 2018, 11:17:53 AM3/8/18
to Liberator
I have a small team starting out with Clojure, and we'd like to start with some simple web services.

What trade-offs should I be aware of with Liberator, versus say compojure-api and yada, which I am also considering?

Sean Johnson

unread,
Mar 9, 2018, 4:45:49 PM3/9/18
to Liberator
Jonathon,

I suggest you make that decision based on how much you care about the semantics of HTTP, REST as described by Fielding (and even HATEOAS). Liberator is a Clojure version of Erlang's webmachine: https://github.com/Webmachine/webmachine

The intent of webmachine, and therefore Liberator, is to make a declarative, decision-tree, and fairly strict implementation of the HTTP protocol for building web APIs.

How well does your team know HTTP? HTTP methods, status codes, headers, mime types? REST? HATEOAS? How much do they care about these things? If the answer is that they know them and care about them and have some opinions that using strict HTTP and REST principles is the best way to build APIs, then Liberator is a fantastic choice.

One quick test you can do, is ask each member of that team, "Hey, what do you think about HATEOAS?" If you get back a thoughtful answer, that's somewhat positive from your team members, then it's an team that's informed and cares about this stuff. If you get back, "What's that?" from all or most of the team, then they are likely to just be frustrated by Liberator. It's probably not going to be their cup of tea, you're better off going with a different Clojure lib(s).

Cheers,
Sean

jmcki...@gmail.com

unread,
Mar 10, 2018, 3:35:02 PM3/10/18
to clojure-...@googlegroups.com
Good advice! You definitely gave me much to think about.
--
You received this message because you are subscribed to a topic in the Google Groups "Liberator" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure-liberator/U3alpIIxnjI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to clojure-libera...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Jonathon McKitrick
Reply all
Reply to author
Forward
0 new messages