-
Notifications
You must be signed in to change notification settings - Fork 152
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
SimpleUriRouter to KaryonRestModule ? #225
Comments
How would you put this configuration file based approach in contrast to annotations based approach like what Jersey (jax-rs) uses? What pros & cons do you see? |
Well...this is a mythical question, annotations vs configuration :)
I think that a good framework must provide the option to choose how you want to work, for example, play framework, gives you the possibility to choose between annotations in your controllers or have a routing file with all routes: Annotations: Configuration: Another good example for me is in the library GSON from google, you can configure the GSONBuilder to use annotations or not.
In conclusion I think would be a good point give support both options. How do you see? :) |
Hi @NiteshKant, I made a first draft version using annotations: https://github.com/scm-spain/karyon-rest-router I'll keep adding features and anything that could be useful. |
@victuxbb great! Let me know when you are ready for a PR and I can review. |
Hi! I would like to discuss about the question that I made here
https://groups.google.com/forum/?fromgroups#!topic/karyon-users/k-nrZ9V2OoQ
Currently I working on a company (Schibsted) that gives me time to collaborate (or try it) with your amazing NetflixOSS ecosystem :)
Well, I first approach that I'm thinking could be...
1- A config file were you put the configuration about REST resources, for example:
2- When Karyon starts, it reads this file and then by "reflection" we can read all classes on it and by a convention of methods, build routes that matches this methods, for example:
CampaignsResource.java
Reading this methods you can extract by convention this routes:
All this development would be a module that you can load in the bootstrap application
What do you think? I'm completly open to changes or new ideas :)
Thanks!
The text was updated successfully, but these errors were encountered: