shekhargulati / 52-technologies-in-2016

Let's learn a new technology every week. A new technology blog every Sunday in 2016.
https://shekhargulati.com/
MIT License
7.2k stars 598 forks source link

Feedback: Week 6 OkHttp #8

Open shekhargulati opened 8 years ago

shekhargulati commented 8 years ago

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

abacaj commented 8 years ago

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

shekhargulati commented 8 years ago

@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?

abacaj commented 8 years ago

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 :)

shekhargulati commented 8 years ago

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

abacaj commented 8 years ago

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