Amen brother or another article on why XML should be used with caution
In "It's the XML Configuration File's Fault" author points out that XML is a killer technology in a very literal sense - it kills productivity. Personally I went through a pain of at least 3 projects where heavy use of XML had a huge negative impact on application performance and also caused tons of hard to maintain code. The resulting applications were bulky, slow and pain to maintain. The author actually found himself in Python Land before he realized that it was not Java itself to blame. OK, Ant author had already apologized (http://blogs.tedneward.com/default,date,2005-08-22.aspx) and others will follow when they get it. What should we do about it now? Here are a few ideas:
- Use annotations wherever possible and makes sense: Hibernate, EJB3 are using it already
- Don't ever design languages using XML semantic! Please.
- Don't forget about property files for configuration, often you don't need XML
- Avoid using projects that force you into editing XML all the time. Specially so if these XML files are big
- Anytime you find yourself using XML for anything else then data and configuration: stop and think. Chances are there is much better way.
And BTW, may there is a need for new format to replace XML with before people get to far off with Binary XML project. Perhaps considering Python popularity, its great semantic elegance should be considered. For example, how about PML:
much better looking then:
And one more thing, we need this new mark up to be embeddable into other languages syntactically.
- Use annotations wherever possible and makes sense: Hibernate, EJB3 are using it already
- Don't ever design languages using XML semantic! Please.
- Don't forget about property files for configuration, often you don't need XML
- Avoid using projects that force you into editing XML all the time. Specially so if these XML files are big
- Anytime you find yourself using XML for anything else then data and configuration: stop and think. Chances are there is much better way.
And BTW, may there is a need for new format to replace XML with before people get to far off with Binary XML project. Perhaps considering Python popularity, its great semantic elegance should be considered. For example, how about PML:
book in-stock:true
name:The Salmon of Doubt
author:Douglas Adams
much better looking then:
{book stock="yes"}
{name}
The Salmon of Doubt
{/name}
{author}
Douglas Adams
{/author}
{/book}
And one more thing, we need this new mark up to be embeddable into other languages syntactically.

0 Comments:
Post a Comment
<< Home