I see a lot of code (made some myself too) that use XML to "automate" or "make it easy" programming. In example we have standalone Swing UI, that has navigation tree, and multiple pages linked to each tree node. XML may look like this:
<navitem text="Setup" page_class="somepackage.SetupPage"/>
<navitem text="About" page_class="somepackage.AboutPage"/>
The program parses XML and creates user inteface. I can write, instead:
navtree.addPage("Setup", new SetupPage());
navtree.addPage("About", new AboutPage());
For me it looks the same. The later is even better:
a) no need for fancy UI builder.
b) no reflection. Which is nice when I hit CTRL+SHIFT+G on Eclipse to find all code that uses my class. And I can safely obfuscate my JAR.
c) it's much more easy to alter individual objects.
This kind of "automation" still requires individual pages coded. I can't just change XML and it will not start working unless I provide all those classes needed. I went that "XML automation" way before but now more and more I think it's not that good. It just creates jobs
In short I am now against XML that will not change application behaviour without additional coding.
I would like to ask you, what do you think on this topic? Am I right or wrong and why?
Vladas