• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Put it in an XML file!

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it just me, or is anyone else tiring of the continuing trend to externalise entire applications to XML files? APIs and frameworks like Jakarta Commons and Struts can often make an application far more fragile and difficult to maintain.

The belief that having to alter code (rather than config files) is an "expensive" option in doing any mainenance work is misguided. How often have you put an invalid entry in a resource bundle or struts-config that leaves you with cryptic and untraceable errors? Furthermore, the simple text format of XML files encourages people to have a look around and tinker moreso than with code, often with disasterous consequences.

Personally, I'd rather have my config specified in config "classes" that are part of the compiled application. Oh the hours of productivity that would be gained...

XML is for allowing disparate applications to talk to one another. Let's leave it at that.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I feel you, Fletcher, but

Originally posted by Fletcher Estes:
XML is for allowing disparate applications to talk to one another. Let's leave it at that.


XML is also good at representing hierarchical data. If you have a configuration file of some sort, would you prefer it to be XML or a "quasi-hierarchical" .properties file? If neither, I'm all ears to learn about your alternative!

Also, regarding your comment about "tinkering around", why is it such a bad idea? Obviously you can mess up by editing the configuration file incorrectly but creating obstacles for making valid changes is, in my opinion, the wrong way to approach something that's a discipline problem. Adding more compliance-focused process will only courage people to be less disciplined.
 
reply
    Bookmark Topic Watch Topic
  • New Topic