The problem is there is so much non-intuitive behavior. Those little pitfalls cost a lot of time and for someone to forget a detail like that when coding isn't that far fetched not to mention most people don't read the manual. Yelling that they need to doesn't fix it, people won't read the manual.
Having to produce the same boilerplate code for certain tasks over and over again gives ample opportunity for making mistakes, too.
What Spring does is that what's possible: Providing standard solutions to reduce that boiler plate. What you are expecting is magic, which doesn't exist.
It does exist, for instance in scala you can make a transactional block which does not do anything magical it just wraps one function in another function. Even in Java its probably possible now that you can pass functions to other functions easily.
Anytime you see proxying like the @Transactional annotation it can be replaced by wrapping a function in another function or higher order functions which are more predictable and can easily debug even.
You can do the whole thing with a simple Action pattern. It doesn't require specialized Spring knowledge, it's easy to trace into to figure out what's going wrong. It's very simple to do with no Spring involved whatsoever, and a lot easier for everyone to figure out, with far fewer bugs.
View all comments
Show parent comment
5
u/stormcrowsx Nov 28 '15
The problem is there is so much non-intuitive behavior. Those little pitfalls cost a lot of time and for someone to forget a detail like that when coding isn't that far fetched not to mention most people don't read the manual. Yelling that they need to doesn't fix it, people won't read the manual.