Is there any serious part of the Java (Java, not Scala or Clojure) ecosystem that doesn't involve XML at every corner?
Is there any serious part of the Java (Java, not Scala or Clojure) ecosystem that doesn't involve XML at every corner?
Also, I really wouldn't complain about Maven, as it is hands down the best dependency manager available from any language, bar maybe gem/rails (node isn't even close, since you need a c++ compiler to actually get quite a few packages). There are also enough plugins for every IDE out there to handle Maven POM's.
But if that wasn't enough, there's now Gradle. You can literally have an entire Spring/Java/Grade project that doesn't use ANY XML, but purely Annotations/DSLs.
Secondly, there's a major selection bias at play. In your own words "everything I've seen of...", sorry but your point was lost right there.
Yes. I've seen (and written) plenty of actual production Java code that doesn't use any XML configuration at all.
There are a lot of issues with Java, but XML isn't INHERENT to it.
You still have to learn them by heart for each lib, you don't know when they are executed and you cannot reason about them (as you could with source code).
Pretty much the same problems as XML if you ask me.
I don't see any difference between having to understand annotations and having to understand libstdc++ for example, or having to learn about any particular ruby gem or node package.
Every language has to deal with configuration files. Complaining because a bunch of Java developers used XML in their projects seems trite.
I think XML actually has a lot of strengths (having well-defined-types and structure for one). If the complaint is that it's worse than JSON, well...I've seen way worse than XML (ASN.1 for instance), so idk...
Why? You don't back that statement up with anything. What makes it better than `pip`?
> node isn't even close, since you need a c++ compiler to actually get quite a few packages
Well if the packages contain C/C++ modules and don't distribute binaries... (which a lot do). In Python land packages with a C++ module normally have a pure-python fallback anyway.
From what I understand, there's a fairly large chasm between Python 2/3 (such that a lot of people use external libraries to deal with coding cross-compatibile code, and apparently get wrong some-times).
Completely not true in my experience. Running pip install and finding out a dependency is native code is the worst feeling, because now I need to replicate a dev environment for building the damn thing, on windows I don't even bother, on linux I'm left hunting down the right linux packages, which if someone bothered to specify was only specified for one of the distros.
> Why? You don't back that statement up with anything. What makes it better than `pip`?
I'm not super familiar with the python ecosystem, but my biggest gripe is above (randomly, dependencies will fail to install). My second gripe with python is that so many things need virtualenv.
In this regard I've had a lot less pain with npm (but I've also done far fewer things in node), and I've never had an issue using a library in the java ecosystem, I just plug the appropriate deps into my build system, and it works, no installation required.
Beyond "can I use the packages easily", Maven also supports artifactory so that we can have org-wide libraries rather than needing to rely on git to avoid duplicating files everywhere. Beyond that Maven is also the Grunt of the Java world; it compiles your code, it invokes JUnit, it runs your fancy code rewriting modules, it does your jar/war packaging, and runs all the other modules you want.
Maven has it's own issues sometimes, but having too much XML is so far down the list of things I care about, but Gradle is nice too and the syntax is much more terse and I try to use it for my own non-work projects.
In contrast to the general "install a pile of things not in your dependency manager" approach of pip/npm, I just setup a java project to use webkit (with no prior experience trying to do this in java at all) in 5 minutes by adding 2 entries to a pom.xml file as described on https://github.com/ui4j/ui4j/
packages with a C++ module normally...
Sorry, but 'normally' doesn't cut it for me (or the organizations that I work/worked for).I can use ANY maven dependency, regardless of what JVM language it was built with, what language level (java 1.1 - 1.8) it was built with, pretty much anything.
In case I wasn't clear - I wasn't trying to have any sort of "point," merely asking for the sake of learning what the Java world looks like. I think my experience with Java is pretty average for a non-Java developer, though (I took one class in college, and worked a few years on the client side at an enterprise software startup, where the server was J2EE, and had no particular influence on what stacks were used in both contexts). I certainly am not complaining about Maven, just relating the fact that it involves lots of XML.
But... I'll be the first to admit that Java isn't the perfect tool for every problem, and I certainly feel that as engineers, we should use the proper tool to solve the problem.
But I have to say that XML is often blamed by people who think that complexity would magically vanish. Complexity does not vanish. It can only be shifted around. And it often requires lots of iterations to find an approach that is good enough for everyone. Back in the days, if tooling was right, I did not care about the amount of XML.
There is ONE exception, when I decided to mod the game Starsector, setting up the project, and compiling and running while using IntelliJ is far easier than any other Java project I ever had, also no XML anywhere, it so wonderful it ALMOST made me like Java.
Barf