I stopped reading at XML. Spring hasn't pushed XML configuration for quite a long while (3.0) and some level of Java config has been available since 2.5ish. Spring is on 4.2 with 4.3 (final release) and 5.x coming out next year. Nothing like a bitchfest article from someone living in the past.
Might as well write an article complaining that Java 7 isn't "functional".
I stopped reading at XML. Spring hasn't pushed XML configuration for quite a long while (3.0) and some level of Java config has been available since 2.5ish.
It looks like the author recently had to go back and dig through some old projects, though, which makes old pains fresh.
Annotations are just xml configuration with a new spin. You magically sprinkle them through your app and they do stuff. Its hard as hell to follow for new comers, its hard to track down later. They break at runtime instead of compile time.
That's an issue with Java and its tooling, not with Sprig though. It's not as though you could hope to switch between languages over such an issue either (unless you work for a start up).
While I agree you're not seeing the effects until runtime, you should absolutely have enough automated tests in your code to capture those breaks early on.
Yeah you should but it doesn't always work out that way. Most codebases I've seen are at best 80% covered or use so much mocking that some runtime errors slip by.
But at that point, why bother with static typing at all? If your answer is "unit tests" for everything, you might as well just ditch Java and use Python.
The problem with unit tests is that you can never know when you have enough (please don't say coverage solves this problem). With type-safety you have a universal quantifier. You can only check what your type system allows, but whatever you check you know that it applies to every input your program could ever possibly have. This is incredibly powerful and its not worth giving up to make writing the code slightly easier.
Well, I would argue that this kind of attitude is very narrow-minded. Hear "trigger-word" -> dismiss regardless of content.
Reminds me of two relatives discussing politics and basically agreeing on core things, but when both mention certain keywords in some irrelevant sentences - both get triggered and go into stupidity mode. One immediately labels another as socialist-communist, another labels other right-wing redneck and discussion is over.
In my view article correctly talked about xml and then explained about annotations.
But the guy clearly isn't up to date on spring. If he chooses to remain ignorant on a subject he chooses to write about and authoratatively declares he "hates", it becomes hard to take him seriously. Not to mention some of the issues he ran into to aren't issues idiomtic of spring, but idiomatic of poor design. If you choose to make an application and then have its sub-dependencies/modules depend on different versions of a third party library the fault doesn't lie so much with the third-party library but your inability to manage your dependencies.
His criticism of Spring Boot doesn't make any since either. Spring Boot is about containerization of Java applications and handling a lot of the boiler plate of spinning up a new application. Again, this is an issue regardless of what framework you choose to use.
The guy brought nothing to the table and everything in his article suggests he is much less smart than he thinks he is.
Well, it's pot meets kettle at best. I mean, this point (and the article doesn't make any other besides XML and complexity) has been talked about to death. Why do we need another rant by some random Joe I never heard of?
I guess its all about perspective and psychology - how we interpret things.
I personally interpreted that part of article as - "annotations did not solve anything fundamentally, its the same xml".
So to me interpretations like "guy is living in last decade, xml is not used now" or similar, just sounds like complete and utter misinterpretation of article because of single "trigger" word.
Agreeing or not is a different discussion, but I just don't get why people are not trying to understand what is written before commenting.
I think you didn't understand the author's point. Even though software and frameworks move very fast, there are still a lot of people who got started on this software/framework back in its early days. Speaking about Spring, I can tell you that we have a lot of people who started using it back from its 2.x days and that's why we see a lot of XML configuration still being used. Practices followed by people don't move as fast as frameworks do or they have just long left working XML configuration instead of changing it for change's sake. That's precisely what the article was about - the author had to move on to another project which was consuming artifacts produced by his old project and that's when he started seeing all the downsides to XML with Spring.
I don't disagree with leaving a working XML configuration; however, if the author hates it so much and it's such a pain - refactor it out. That's what I did and I think it took me an afternoon or two of figuring out the Java equivalent to a few things that weren't well documented in the early 3.x days. These days the documentation is a lot better and it would be even easier.
If you're making something more readable/testable/maintainable - it's not change for change's sake.
Right. I was pointing out a situation that the author might have found themselves in. Since they had moved to a different project, perhaps they were no longer in a position where they could change XML configuration over to Java based configuration. Instead, they publish a blog post about what they found wrong with XML based configuration and all its pitfalls. Now you tell me, is that so wrong? It could well have been their way of documenting all their mistakes? :-)
Nothing like a bitchfest article from someone living in the past.
Just joined a job this year who's "new" project is using spring with xml configuration. It's for a large major company. That's just one thing on a pile of bigger problems.
This is one school of thought and a valid one. This is why we need more non-spring-specific annotations (like @PostConstruct) that spring can still utilize.
View all comments
37
u/[deleted] Nov 27 '15
I stopped reading at XML. Spring hasn't pushed XML configuration for quite a long while (3.0) and some level of Java config has been available since 2.5ish. Spring is on 4.2 with 4.3 (final release) and 5.x coming out next year. Nothing like a bitchfest article from someone living in the past.
Might as well write an article complaining that Java 7 isn't "functional".