You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
your library is amazing addition to pure programatic Javalin handlers.
I don't know how many projects depend on the API currently but would naming controllers and verbs:
@HttpController
@Get
@Post
...
be more consistent with @WsController since protocol is specified in controller name?
Also, websocket events could be named without prefixes since repeating @Ws* is redundant (or maybe replace it with @On prefix to signalize it is an event?).
Plus, it is less noise in endpoint annotations.
Allow for custom @Qualifier annotation definitions so we can use more meaningful annotations as aliases instead of @UseConverter("Some.Very.Long.Unique.Namespaced.String") as they could get quite verbose and repetitive for multiple controller arguments. I kinda like writing annotations in the way natural speech would flow and I personally think it's more readable e.g.:
@Qualifier@Target({ FIELD, PARAMETER, METHOD })
@Retention(RUNTIME)
public @interface Principal {}
@HttpGet(route = "{id}")
publicUsergetUser(@PrincipalImmutableUseru, @FromPath@Named("id") UUIDid) {
System.out.println(u); // This is currently null :(System.out.println(id);
returnnull;
}
Allow for @Valid annotation from jakarta's spec so we could enforce validation before. And in the same manner as registering custom injector for DI library, allow for configuring custom validator bean implementation (e.g. Hibernate Validator)
@Valid@FromBodyMessagedto
I'd like to point out that with few more features like these, Javalin, this MVC library, Immutables.org & Guice have a potential to become a deadly combo for REST APIs. Almost like spring, but 10x faster, smaller & less boilerplate 😅
I'd like to hear your thoughts on this.
Thanks in advance
The text was updated successfully, but these errors were encountered:
Hello,
your library is amazing addition to pure programatic Javalin handlers.
I don't know how many projects depend on the API currently but would naming controllers and verbs:
be more consistent with
@WsController
since protocol is specified in controller name?Also, websocket events could be named without prefixes since repeating
@Ws*
is redundant (or maybe replace it with@On
prefix to signalize it is an event?).Plus, it is less noise in endpoint annotations.
Allow for custom
@Qualifier
annotation definitions so we can use more meaningful annotations as aliases instead of @UseConverter("Some.Very.Long.Unique.Namespaced.String") as they could get quite verbose and repetitive for multiple controller arguments. I kinda like writing annotations in the way natural speech would flow and I personally think it's more readable e.g.:Allow for
@Valid
annotation from jakarta's spec so we could enforce validation before. And in the same manner as registering custom injector for DI library, allow for configuring custom validator bean implementation (e.g. Hibernate Validator)I'd like to point out that with few more features like these, Javalin, this MVC library, Immutables.org & Guice have a potential to become a deadly combo for REST APIs. Almost like spring, but 10x faster, smaller & less boilerplate 😅
I'd like to hear your thoughts on this.
Thanks in advance
The text was updated successfully, but these errors were encountered: