4 ms·
Java is a great language with a terrible ecosystem. Why is it so awful, and what can be done about it?
by exbotanical 4y ago
Java is a great language with a terrible ecosystem. Why is it so awful, and what can be done about it?
- PaulHoule 4y agoIf anything it is the other way around. C# is a better language than Java but has a much worse ecosystem. People complain that they can’t do what they want in a maven POM file but that is because you aren’t supposed to be able do very much with XML. POM is based on a system that materializes Java objects that do the work. When you find “you can’t get there from here” in a POM that is the time to write a Java class that does what you want and load it into your POM. If you try Python you might find yourself pining away for maven’s correct dependency resolution algorithm. Most people think annotations in Spring are a way to avoid the annoyance of XML but you disagree. I will tell you what’s not in the manual though. The Spring core framework, like the maven POM system is all about instantiating ordinary Java objects. Some people though seem to think life isn’t meaningful without ‘plugins’ and ‘integrations’ but unfortunately they pay a heavy price for this. You don’t need “Spring X” to do “X” in fact you are very fortunate if incorporating “Spring X” doesn’t fail your project right there. “Spring X” projects are run by whatever rando got the idea to make it first and there is no quality control or no effort to maintain the Spring brand image. (Though Spring Batch does have some great ideas, unironically, that have been passed down by the macro assembler masters of the mainframe era.) I still like Spring but a lot of people have moved on to Guice.
- jareds 4y agoHow does someone move from sprint to Guava? From what I understand Guava provides nicer collections and utility methods which is not nearly the same thing the Spring ecosystem provides.
- PaulHoule 4y ago... oh crap I meant Guice! Sorry about that, I edited it above. Guava is it's own thing with its own problems. In particular I think Guava has proven itself to be very dangerous as a "superdependency" that does too much. Somewhere around Guava 13 they introduced a change that broke HDFS and I was coding for Hadoop at that time and ran into problems w/ diamond dependencies I couldn't bring into my project because they required a Guava that broke my runtime.
- EdwardDiego 4y agoI'm a big fan of Micronaut's compile time DI, especially as it can be used standalone. I hated DI from my experiences with Spring, but compile time DI and a deliberately less complicated approach helped me enjoy it again. No more waiting a minute for the giant Spring app to eventually throw a bean not found exception. Quarkus also has compile time DI, but currently it's rather coupled to Quarkus' build steps. Oh, and yes, moving to a Python codebase makes me miss JVM dev so. Much.