Hacker News new | ask | show | jobs
by foo4u 3780 days ago
Gave this a quick look. I'm much more a fan of Spring Boot (http://projects.spring.io/spring-boot/). Like Pippo, Spring Boot starts with a lot of auto-configured defaults that can get you off the ground quickly. However, the full power of Spring and its related projects are at your fingertips and you can reduce the amount of auto-configuration as your project becomes more complex. Also like Spring's stereotype principles more than extending a base "Controller" (in Spring, you annotate a POJO with @Controller or @RestController).

As mentioned previously, JAX-RS really shines for micro services. The same interfaces can be shared between client and server, making client development a breeze. Spring Boot supports JAX-RS services as well via a Jersey adapter.

1 comments

Much as I dislike inheritance, "annotating a POJO" is even worse. How do you debug it if things go wrong?
Same as any other code--via debug step-through, or logging, centered on the code that processes the annotations. It's actually much saner than heaps of "marker interfaces" and is readily testable.
Annotated methods are also much easier (to debug) than a ton of callbacks and in theory have less GC stress.