52-technologies-in-2016 icon indicating copy to clipboard operation
52-technologies-in-2016 copied to clipboard

Feedback: Week 6 OkHttp

Open shekhargulati opened this issue 8 years ago • 5 comments

Please provide your feedback by posting a comment against this issue.

shekhargulati avatar Feb 07 '16 15:02 shekhargulati

Hi, have you considered Vert.x - very stable and well maintained (last commit 9 hrs ago) set of libraries for writing performant and distributed rest APIs and more. It is a Java library but may have been just as easy to use as okhttp - http://vertx.io

abacaj avatar Apr 25 '16 04:04 abacaj

@abacaj I have not looked into vertx.io in-depth yet. I am aware of vertx.io from last few years(when I was working with Red Hat) but I don't think it has gone mainstream or people use it a lot. Do you use it?

shekhargulati avatar Apr 25 '16 04:04 shekhargulati

I don't use it professionally since we actually use full .net stack, but I did use it for a personal project and found it very intuitive. Their documentation is excellent. It's essentially broken into many libraries, but vertx-web is comparable to a modular asp.net and has support for everything you can think of, the best part you choose what features you need.

Take the following code snippet as an example of how expressive it is:

router.route().produces("application/json").handler(routingContext-> {

  HttpServerResponse response = routingContext.response();
  response.putHeader("content-type", "application/json");
  response.write(someJSON).end();

});

That code reads like English :)

abacaj avatar Apr 25 '16 04:04 abacaj

@abacaj yes it certainly looks clean. I will see if I can fit vertx into my series and probably write about it. Thanks.

shekhargulati avatar Apr 25 '16 04:04 shekhargulati

That's good to hear, look forward to reading more from your series. Great work so far.

abacaj avatar Apr 25 '16 04:04 abacaj