5 ms·
When I used to use Java, the thing that I found remarkable was how much stuff you had to write in other languages. You had Spring, Ant, Hibernate, Ibatis, text-
by injb 7y ago
When I used to use Java, the thing that I found remarkable was how much stuff you had to write in other languages. You had Spring, Ant, Hibernate, Ibatis, text-based "properties" files etc. It seemed that Java programmers were willing to go to great lengths to avoid writing anything in Java. But if Java was so unsuitable for such a wide range of tasks, what made us think it was a good general purpose language?
In contrast, when I started using Python, one of the things I liked was how suitable it was for all the things that Java developers typically used other languages for. Your typically Python project back then contained very little that wasn't Python, because there weren't many things that it wasn't useful for.
Things may have changed with Java in the 9-10 years since then but I think that was certainly one of the things that led to Python becoming more popular.
- Nursie 7y agoThis is not really true any longer. Spring, thankfully, seems to be going away. Java itself is now far more feature-rich in terms of lambdas, anonymous classes, stream processing etc. I came back to java about 4 years ago after a long time away and have found it quite pleasant, and quite different to how you describe it. I think I skipped the 'enterprise' years, thankfully!
- Turbots 7y agoSpring is by far the easiest way to write modern web applications with REST APIs, a frontend, database layer, messaging integration, whatever. It basically does all the boilerplate for you and leaves it up to you to just write your business logic. I don't know how you can miss that.
- oftenwrong 7y agoSpot on. Thankfully it is becoming more common to Just Write Java. Java without the frameworks and other bloated crap is actually decent. The language itself has a lot of warts, but the Java ecosystem is one of the best (Python too).
- MH15 7y agoThis is how I feel about the language! Modern Java works well enough to me that the frameworks are nearly never justified.
- smabie 7y agoWhat ecosystem? The JVM doesn’t require Java. Scala is pretty much categorically better in every way than Java.
- retbull 7y agoNot in maintainability. It is pretty hard to follow Scala when people use the flexibility too much. You have so many options that everyone develops their own flavor of overrides/overloads and style. This makes transferring skills between jobs or even just projects much harder as the same looking code line can mean several things.
- deleted 7y ago[deleted]
- jayd16 7y agoYou mean, you had to edit the build file, some SQL and some configs that weren't baked into the compiled code?
- tootie 7y agoYou don't actually need to do any of that. If you're writing Ant, I assume this was at least 10 years ago. Modern Spring Boot is all annotations and using an ORM is out of fashion. Maven can be a little complicated, but it's easy to work off an archetype and it's far more sophisticated than npm. Python doesn't have this problem, but it also just doesn't have these features as an option. You can certainly build a Java project with javac but we generally don't because Maven is better.
- abledon 7y agowait.. using an ORM is out of fashion now? is everyone doing direct SQL queries again?
- tootie 7y agoYes. Or use a NoSQL DB.
- michaelper22 7y agoOr the ORM (Hibernate by default) is abstracted behind Spring Data interfaces. It's pretty easy to autowire the EntityManager if you need it.
- oftenwrong 7y agoI favour jOOQ.
- abledon 7y agooh, i like its DSL, much more sane than raw sql queries.
- proverbialbunny 7y ago>But if Java was so unsuitable for such a wide range of tasks, what made us think it was a good general purpose language? Other competing languages you would use today didn't exist, and C++98 was a pain in the ass. The selling point back then was Java was C++98 with all of the difficult parts stripped out, and with good tooling and IDE support. Back then people flocked to Java like some sort of oasis. Today, even modern C++ is better in most ways.