by mschuster91 · 9y ago · 0 comments
Java is a great language in theory, the problem with Java is that people have evolved to use layers upon layers upon even more layers of abstractions, the tooling is horrenduos (try configuring maven vs npm) and especially all complex Java applications end up being as slow as molasses (e.g. SAP GUI, Lotus Notes, Eclipse, jDownloader, Vuze on the GUI application side).
This leads to people projecting their horrible experiences with the Java ecosystem and applications to the language itself, which is a pity.
vs Cargo (Rust) - http://doc.crates.io/build-script.html (simplicity)
vs elm-package (Elm) - https://github.com/elm-lang/elm-package (automatic semver compliance)
vs Stack (Haskell) - https://docs.haskellstack.org/en/stable/GUIDE/ with stackage-sets (packages tested to work well together) - https://www.stackage.org/
That's kind of a weird comparison since npm is a package manager and maven is a build tool, packager, dependency resolver, test runner, ...
A better (but still lacking) comparison would be "try configuring maven vs. npm+webpack", and then I'd say... oh god, I'll take maven in a heartbeat.
Also there are lots of similar architectures in the .NET world with WCF, Web Forms, EF, SharePoint, ...
Anyone that thinks JEE is bad, should spend some weeks trying to do the same with CORBA, DCOM or SOM, in either C or C++.
Same thing will happen to Go, JavaScript, Scala, or whatever language gets adopted into the enterprise cathedral.
Example "Lifecycles" [0]. The documentation says "Maven is based around the central concept of a build lifecycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined." The first sentence just says "this is important!". I have no idea what that second sentence is supposed to tell me. The documentation goes on without a clear definition what a lifecycle is. I figure it is a kind of command. Afterall, the basic lifecycles are "default" which is "make all", "clean" like "make clean", and "site" like "make docs". I'm not sure, there is no good definition of "lifecycle" in the documentation there. Hard to understand.
Well, there is a predefined set of lifecycles and each lifecycle has a predefined list of phases, where stuff can hook into. For example, with java the compile phase will turn my java files into class files. The test phase will turn class files into test reports. Recently, I wanted to merge multiple coverage reports [1]. Turns out, this is done in a compile phase, which is reasonable. However, the reports are generated in the test phase, which is after the compile phase. At this point, I'm lost. This corset of phases is restricting me.
[0] https://maven.apache.org/guides/introduction/introduction-to... [1] http://www.eclemma.org/jacoco/trunk/doc/merge-mojo.html
Gradle has all sorts of failings, and is overly complex in its own way, but at least it gets the meta-model right: provide fundamental tools for building a graph of tasks with dependencies between them, and ship a set of hopefully useful tasks built on top of that.