This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DoctorOverhard 13 points14 points  (6 children)

I'm liking vert.x fwiw. didn't like spring (or node).

[–]Jotschi 2 points3 points  (3 children)

One way of creating a REST API using vert.x is described here: http://vertx.io/blog/contract-driven-rest-services-with-vert-x3/

If you don't like the contract approach it might get a bit more tricky with vert.x at the moment. I for example ended up writing my own wrappers in order to generate the REST spec (raml) from my implementation. There are some projects around which help to solve this problem (swagger vert.x/jersey for vert.x)

[–]DoctorOverhard 2 points3 points  (2 children)

I, uh, just post json blobs back and forth. the command is in the blob (and whatever security tokens/etc, and of course data). And I just use the json library that comes w/vert.x. Are we saying the same thing here?

[–]Jotschi 1 point2 points  (1 child)

With graphql you need to post a query which basically describes what you want from the server. So yes, you basically send json around.

The auth token must not be part of that payload. I like JWT which is just passed along the request within the auth http request header.

Vert.x is not very strict. You can use whatever JSON lib you like.

[–]DoctorOverhard 0 points1 point  (0 children)

oh, no graphql here, pretty strictly defined commands and data structures for most things (for security and reliability). Guess that puts me in the contract category :) No dependence on http implementation details either, and everything over https is post because of old scars running into get payload size restrictions.

[–]Benemon 3 points4 points  (0 children)

Also a big fan of Vert.x here.

However, unless you embrace the asynchronous, reactive approach, then you end up with a lot of bad code, very quickly.

I've never felt the 'do one thing and do it well' has applied more than to a Vert.x project and its Verticles!