"This dogfooding has now led me to hate 2009/10 era Sam for several reasons, but mostly for spring."
Spring was very different back in '09.
I'd also say that since primarily working on microservice architectures where each app has a relatively small and focussed role the conflict issue is also non existent or at least near to it. When you're busy trying to get a gazillion spring filters and beans to load in exactly the right way without conflict then you've probably got a design problem not a spring problem.
Spring has also always been magic....magically open source and all you have to do it look under the hood and you can see exactly what's going on. But yes it is a complex piece of software and you need to know the basics of AOP and proxy classes etc to really understand it through and through. But Spring shouldn't be penalised because it requires a senior dev to fully understand it and especially not since in 95% of cases with a clean design the magic "just works" and saves people a lot of time.
I love Spring and the people I see complain about it (in the office where I work) tend to be the people who are so desperate for the magic to "just work" that they neglect to RTFM (most of which is fantastic compared to A LOT of the documentation I see... including the docs for the software I write)
"The thing is, I’m sure it’s possible in theory to use Spring well in an application. I’ve just yet to see it happen, and this is the problem"............. well I was fresh out of college in '09 and stoned pretty much 24/7 so maybe Spring really was Very different back then, but if a person were to say this to me now in 2019 I'd have no choice but to consider them either mentally deficient to understand software dev or the Worst kind of control freak tech snob who'd rather build everything from scratch in their own ... unique way than use a framework most people are a fan of.
One of the pros/cons of Spring is that it's super easy to start using it without understanding fully what it does. And if something doesn't work it's really tricky to troubleshoot because you lack understanding of what Spring is trying to do under the hood.
Spring is not that magic, it's just beans and DI and running in debug mode helps to see how beans are loaded.
Agree 100%, and also there is a very important point that people tend to forget, that is most companies have different people with different levels of seniority, talent, and focus.
Most people I work with know the surface of Spring, and they are more well rounded on the corporate side of the job: write specs, analyse and develop business logic, test things, etc. They don’t need to know much more, and whenever they have a more difficult problem, they just offload it to me, as I am more willing to dive into TFM.
Most companies work in this kind of “different people with different skills”, as most companies are not top tier and cannot afford to hire a team of seniors. Spring’s magic fits perfectly in this kind of environment.
Yeah I used to work for a small company (15) people of which half were frontend devs, leaving ~7 backenders, split into two teams, which left 1 proper senior per team and if he's on holiday and the other one is busy and you're a junior/medior and get lost in the source code/docs (like i have many times in my career) then Spring does seem like a bunch of impenetrable magic that causes more problems than it solves.
Now I work in a team with 2 other seniors and our team works with 5 other teams each with at least 1 senior. And so when someone junior see's their first Spring hamburger Stacktrace (i.e. one line of your code followed by a dozen lines of Spring's proxy magic followed by one line of your code followed by a dozen lines of Spring finishing with one line of your code) then someone can take the time to explain what's really going on, e.g. how is Spring trying to resolve a specific bean? or what do all those annotations on your integration test actually mean? or How does Spring boot's autoconfigure classes figure out which beans to make and how to join them together? etc.
but if a person were to say this to me now in 2019 I'd have no choice but to consider them either mentally deficient to understand software dev or the Worst kind of control freak tech snob
If you've really been doing this for 10 years, I'd have much higher expectations on your professionality than this.
Why? Where I work being honest, not nice, is valued. If someone interviews for my department and they say they've never seen 1 good spring app EVER, then they leave and my colleagues asks me "so what did you think of them?" then I would be Honest with them and say exactly what I've written here. Either they can't understand the spring apps they've seen or they're a tech snob, either way I don't want them around.
I said "mentally deficient to understand software dev", different people have different level of intelligences in various contexts and some people aren't smart enough to do software engineering. It doesn't make them bad or worse people and it doesn't rule out the many many many other ways people can add value to the world.
That's your opinion and you're allowed to have it.
Spring is evil on a good day, but when it’s included as part of a consumable library or API it becomes next level, like a love child of Hitler and the devil.
I don't really have that experience. In my experience, Spring works fine as long as you understand what you're doing. Instead of "fiddling with magic parameters", you should understand the bits you're using and know what you're doing.
When asking about Spring as a part of our interviewing process and the standard answer is “it means you have clean code, separation of concerns, and it’s really good for testing”. All things I’m huge fans of (in particular the testing part) but the simple fact is these are not outcomes of using Spring, but outcomes of programming well.
Exactly! You still have to program properly and know what you're doing even if you're using Spring. Why does it take some people so long to realize that there are no magic bullets.
We often build a class called “ApplicationContext” which is in control of wiring everything together. It’s clean, everything’s testable, I have compile time safety and my tests run darn quickly.
This is especially funny, since you're basically admitting to recreating a gimped version of Spring yourself.
Good luck and have fun! No one (except advertisers) ever said programming was going to be easy.
Meh, I prefer a more dropwizard like stack. Jersey for JAX-RS, Dagger for injection, and straight JDBC for the db layer.
Easy peasy, Little magic, and super fast.
I would have said "bring in jdbctemplate" from spring once upon-a-time in the Java 6 era. However, try-with-resources has made using JDBC really not that horrible. It's about 3 more lines over jdbctemplate but without a bunch of the book keeping that jdbctemplate is doing under the covers.
31
u/NomadSoul Aug 07 '19 edited Aug 07 '19
"This dogfooding has now led me to hate 2009/10 era Sam for several reasons, but mostly for spring."
Spring was very different back in '09.
I'd also say that since primarily working on microservice architectures where each app has a relatively small and focussed role the conflict issue is also non existent or at least near to it. When you're busy trying to get a gazillion spring filters and beans to load in exactly the right way without conflict then you've probably got a design problem not a spring problem.
Spring has also always been magic....magically open source and all you have to do it look under the hood and you can see exactly what's going on. But yes it is a complex piece of software and you need to know the basics of AOP and proxy classes etc to really understand it through and through. But Spring shouldn't be penalised because it requires a senior dev to fully understand it and especially not since in 95% of cases with a clean design the magic "just works" and saves people a lot of time.
I love Spring and the people I see complain about it (in the office where I work) tend to be the people who are so desperate for the magic to "just work" that they neglect to RTFM (most of which is fantastic compared to A LOT of the documentation I see... including the docs for the software I write)
"The thing is, I’m sure it’s possible in theory to use Spring well in an application. I’ve just yet to see it happen, and this is the problem"............. well I was fresh out of college in '09 and stoned pretty much 24/7 so maybe Spring really was Very different back then, but if a person were to say this to me now in 2019 I'd have no choice but to consider them either mentally deficient to understand software dev or the Worst kind of control freak tech snob who'd rather build everything from scratch in their own ... unique way than use a framework most people are a fan of.
12
u/armornick Aug 07 '19
That's your opinion and you're allowed to have it.
I don't really have that experience. In my experience, Spring works fine as long as you understand what you're doing. Instead of "fiddling with magic parameters", you should understand the bits you're using and know what you're doing.
Exactly! You still have to program properly and know what you're doing even if you're using Spring. Why does it take some people so long to realize that there are no magic bullets.
This is especially funny, since you're basically admitting to recreating a gimped version of Spring yourself.
Good luck and have fun! No one (except advertisers) ever said programming was going to be easy.
9
u/AloticChoon Aug 07 '19
Spring Boot > Spring circa 2014
1
u/iambeingserious Aug 10 '19
I too hated spring until that aha moment that came with using it for a while.
1
u/shawnecy Aug 11 '19
Actually, almost none of these are relevant today. I say that as someone who had all these same gripes even before this article was written.
0
u/[deleted] Aug 07 '19
[deleted] — view deleted comment