New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route annotation support for vertx-web #237
Comments
cescoffier
changed the title
[Feature request]: Route annotation support for vertx-web
Route annotation support for vertx-web
Feb 13, 2017
Came across this https://github.com/zandero/rest.vertx. It Provides JAX-RS annotation processor for vert.x. Its currently in beta and has good documentation. |
@udaykale that looks pretty good, thanks for the link. |
There are already several projects that offer this functionality, so I'm closing this issue. It is not the goal of this project to compete against the community but allow it to grow! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In response to the message on the mailing list, "What would you like to see in Vert.x":
The most potentially useful thing missing from vertx-web right now is convenience annotation support for mapping handler classes to URL routes, etc.
Vert.x Nubes has good support for this, and the code looks decent. (It is already linked on the vertx-awesome page, so I'm sure the core Vert.x developers are very aware of it.)
I only became aware of Vert.x Nubes after implementing my own, similar framework, "Gribbit" (the repo does not yet have documentation, but the code is heavily commented; the code is roughly in a pre-beta state, and I'm providing the link more as a reference than as a suggestion to try to clone and use the code for now!)
Proposal: I propose either bringing Nubes into vertx-web, if the author of Nubes approves (and maybe removing the "Nubes" name from packages and classes!), or simply taking ideas from one or both these frameworks (Nubes and Gribbit), and creating a new, simple annotation framework from scratch in vertx-web.
Gribbit has features that overlap with Vert.x Nubes (such as being able to mark methods with annotations to handle GET and POST methods). Nubes has a number of features Gribbit doesn't have, such as supporting injection of Service classes. Gribbit has a number of features Nubes doesn't have, such as the ability to perform reverse routing (to enable a route URL to be inserted into a template based on a handler class reference), and a typesafe template engine (which is out of scope for this current annotation detection proposal).
N.B. To accomplish runtime annotation detection in vertx-web, you may find a library I created useful, FastClasspathScanner, which allows you to quickly and robustly find class and method annotations, as well as classes implementing a given interface or subclassing a given superclass. I originally implemented FastClasspathScanner because I wanted to add annotation support for mapping routes in Gribbit. FastClasspathScanner became a separate project, and has taken on a life of its own -- it is actively maintained, and at this point it is stable and highly optimized. (Nubes currently uses Reflections for its annotation support, which is generally slower and buggier than FastClasspathScanner, and supports fewer classpath specification mechanisms and fewer classloader types.)
The text was updated successfully, but these errors were encountered: