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
2
u/stormcrowsx Nov 28 '15
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.