News for hackers. Stuff that matters.
Re:Spring vs. Java EE by EdwardDiego on Sunday April 09, 2017 @08:06PM (#14075039)
> Constructor injection in Spring is more test-friendly

These are my thoughts too. No reflection or @MoreAnnotations to inject dependencies. I have an aversion to setter/field based injection because it allows you to instantiate an object in an incorrect state.

Re:Spring vs. Java EE by jacques_chester on Sunday April 09, 2017 @08:50PM (#14075206)
> I have an aversion to setter/field based injection because it allows you to instantiate an object in an incorrect state.

Oh yes. I recognise that JavaBeans had its reasons for being, but then you get to JPA and it's time for all the boggling.

Re:Spring vs. Java EE by lazulicurio on Monday April 10, 2017 @06:50AM (#14077386)
My personal pet peeve is bean validation. The goals of the API are laudable, but the fact that the implementation is annotation-driven drives me nuts.

Annotations are fine for intra-project code contracts, but using them for external validation means that if you, say, deploy on a application server with an older version of Jersey, you're suddenly SOL when none of your validation logic is executed.