New simple and transparent REST extension for vertx web.

159 views
Skip to first unread message

javadevmtl

unread,
Sep 29, 2016, 10:56:18 PM9/29/16
to vert.x
Hello, I have started implementing a new util API that adds some annotations and makes it easy to wire up your routes. It dead simple and transparent you do not need to learn any new terms or APIs. It's 1 factory method and a handful of annotations.

https://github.com/javadevmtl/vertx-web-util

Comments, contributions welcome.

Please note it's a fairly rough incomplete prototype. I want to see what your thoughts are.

Jori

unread,
Sep 30, 2016, 12:20:05 AM9/30/16
to vert.x
have a look at https://github.com/aesteve/nubes , seems to have the same goal.

javadevmtl

unread,
Sep 30, 2016, 4:13:58 AM9/30/16
to vert.x
Hi yes I know about Nubes. Kind of, sort of, not exactly the same...

vertx-web-util is just a wrapper around AnstractVerticle. Nubes introduces "Controllers" and "Services" and some other stuff.

This utility is really just extends AbstractRestVerticle which extends AbstractVerticle.

Vert-web-util is closer to Paulo's vertx-web-annotations. He introduces AnnotatedRouter, I may implement his idea.

Vertx-web-util also abstracts away the usual boilerplate code of createHttpServer and possibly more. Its kinda like what BusmodBase verticle was back in 2.x

Paulo Lopes

unread,
Sep 30, 2016, 5:02:26 AM9/30/16
to vert.x
Once you reach a state that you consider stable don't forget to add it to the awesome project:

https://github.com/vert-x3/vertx-awesome

Fuzz

unread,
Sep 30, 2016, 7:43:56 AM9/30/16
to vert.x
Interesting approach.
We had a similar need in one of our projects and built one.

Two differences:
. We found it more useful to allow multiple REST resources within one vertical. This was both for semantics and practical reasons.
. given the limitations of Java inheritance, we found it more reusable to make the rest library as a tool that can be invoked anywhere given a vertx and a router. Less opinionated.

Reply all
Reply to author
Forward
0 new messages