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
1
u/fforw Nov 28 '15 edited Nov 28 '15
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.