r/Clojure • • May 16 '16

Ask /r/Clojure: Secure web frameworks for building REST Api?

I'm evaluating Pedestal and I guess I like it's built-in security features although I'm not sure whether this is just a fluff piece of somebody has actually done a thorough auditing.

I'm working in fintech space and since I'm using datomic I'm pondering what my backend endpoint api stack is going to be. I like the appeal of keeping everything clojure to save the cognitive cost of switching between backend server / datomic, and all in all I've gone through the clojure essentials yesterday and was just blown away by it's concise and straight forwardness, no ambiguity, and see it as a powerful language for dealing with lot of data, and more importantly it feels like the first time I began learning programming, but I digress, I'm turning to the community to get some advice preferably from people who work in fintech.

So should I use Pedestal + Datomic?

I'm sort of wary about using "collection of libraries" that people seem to advocate, and this arises from my experience of using "microframeworks" like Flask in the Python world and ending up googling "how to get stuff I got for free in full MVC frameworks but in Flask + 3rd party libraries that seem sporadically updated by individuals". It left a very bad taste and I've made some pre-judgement here coming to clojure....

However, if I could attain a better security feature by employing the "collection of libraries from the shelf" to build backend API, I might consider it seeing how tight the community is and not flaky like Flask....but again if Pedestal or some full framework on clojure lets me achieve higher productivity and security features then I'd much much prefer the full framework approach.

Anyways I'm going through the more advanced topics on clojure and will come back time to time to check on people's replies.

Thanks y'all.

7 Upvotes

57 comments sorted by

View all comments

Show parent comments

2

u/ohpauleez May 20 '16

I think this comment is harsh and not based on any real evidence, but I'd like to better understand your point of view.

Why do you think I wouldn't approach a project based directly on needs, requirements, and quality attributes?

And a distinctively different question, why might someone (anyone) default to choosing Pedestal over Ring for a web project for a service directly tied to business revenue?

0

u/tolitius May 20 '16

not based on any real evidence

hence an assumption, not a fact.

I don't mean to sound harsh, and this is not my intention, so I apologize if that is how it reads.

Why do you think I wouldn't approach a project based directly on needs, requirements, and quality attributes?

Well, professional client lingo aside: say you have a web based project next week. You know nothing about it yet besides it being web based. Would it be accurate to say you'd be predisposed to bring Pedestal over, and think on how to fit it in? I suspect I know the answer you are going to give (would depend on needs, requirements, and quality attributes...), so this might be left rhetorical.

And a distinctively different question, why might someone (anyone) default to choosing Pedestal over Ring for a web project for a service directly tied to business revenue?

Multiple reasons:

  • someone likes Pedestal, and is excited to use it

  • someone "thinks" it brings a better solution to the table vs. Ring + libs

  • someone does not know what to use, asks a question on Reddit, and gets a "Pedestal is solid, use it" answer.

  • ...