3 ms·
I've mostly come across XML config files that are meant to be edited by humans in various programs that use some kind of Java framework as the back-end. I don'
by bane 10y ago
I've mostly come across XML config files that are meant to be edited by humans in various programs that use some kind of Java framework as the back-end.
I don't Java much, so I'd be hard pressed to remember the various framework names (Spring maybe?) but I remember at one point writing a Python script to de-XML the config files into something that was just a bunch of key=values, then another Python script to convert it back to the required XML. IIR on that project, the handful of config options that needed to be tweaked were spread across a dozen or so different XML files.
If the framework could have just read a .txt file with key=values in it, config changes would have gone from 10 minutes to 30 seconds. I eventually just wrote a python thing that auto-deployed and configured the entire stack after asking you a couple questions.
It was absurd.
I believe Android development does (used to?) require lots of hand XML editing. Most of which just drives a Java code generator. I guess the tooling is better these days, but it was enough to drive me away.
- WatchDog 10y agoSpring was certainly a very XML focused framework. However it has had for a long time ways of using property files in conjunction with XML, while you would still need the XML to define your dependencies, you could have a simple property file for runtime configuration. Thankfully in newer releases and with spring-boot you can avoid XML entirely.
- Mikhail_Edoshin 10y agoConfig files are usually plain key-value pairs and, of course, using a whole eXtensible Markup Language for them is kind of overkill. But if your config files are more complex, say, you need a Makefile-like stuff, then XML is more than appropriate.