| By Duncan Mills | Article Rating: |
|
| November 7, 2008 08:00 AM EST | Reads: |
4,786 |
"With proper markup/logic separation, a POJO data model, and a refreshing lack of XML..." So begins the introduction to one of the current crop of open source Web application frameworks on its Web site. Sadly this seems to be a common sentiment within the Java framework development community; the phrase "XML Hell" is thrown around with the same vehemence once reserved for the "DLL Hell" so characteristic of early versions of Microsoft Windows. Is this wisdom genuine or apocryphal? In this article I will examine some of the reasons why anti-XML sentiment is misguided.
The Roots of the Myth
Where does this distaste for XML in the Java framework development community come from? Several factors immediately spring to mind.
First of all, XML's lack of tooling support is a significant issue. Let's use the XML-driven framework Apache Struts as an example. Though popular, Struts is often held up as an illustration of how XML-configured frameworks are bad (although many making this claim are competitors of Struts). In reality, I think the problem has nothing to do with XML; rather it's the fact that the Struts page-flow metadata represents a series of complex relationships. Of course the raw XML that describes these relationships is hard to understand, but that's not really a problem with the XML itself. Any textual description of a page flow, in code or metadata, is hard to understand. Put that same relationship map into the form of a diagram and the problem goes away. Indeed when mainstream development environments such as Oracle JDeveloper and Eclipse started to provide visual diagramming for Struts, the framework's popularity skyrocketed. An inability to understand something often translates into dislike - perhaps XML has been the innocent bystander in a bigger battle against perceived complexity.
Overuse also adds to the negative perception of XML. While great for describing complex relationships, XML can be viewed as overkill for simple framework configuration. Enterprise JavaBeans (EJB) are often held up as an example of how badly XML can be overused. Interestingly one of the key features of the latest version of the EJB specification (3.0) addressed the issue head on. In the latest version, although XML metadata is still a valid option for describing the entities, code annotations and "configuration by exception" are the norm for describing simpler relationships. XML is only used for the corner cases.
Are Annotations the Future?
After EJB adopted annotations as a configuration option, the floodgates opened and annotations seemed to be the one true path to framework configuration. New annotation-based frameworks such as Seam were developed, and old frameworks such as Struts were hastily retrofitted in a misguided attempt to gain favor.
Published November 7, 2008 Reads 4,786
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
About Duncan Mills
Duncan Mills is senior director of product management for Oracle's Application Development Tools - including the JDeveloper IDE, and the Oracle Application Development Framework. He has been in the IT industry for the past 19 years working with Oracle, Java, and a variety of more obscure programming languages and frameworks along the way. Duncan is the co-author of the Oracle Press book: Oracle JDeveloper 10g for Forms and PL/SQL Developers - a Guide to Web Development with Oracle ADF.
![]() |
hkara 11/25/08 11:36:20 AM EST | |||
Well, there is truth in this article, but there is When people are not in contact with XML directly, Besides that, I think that your article is hitting the right point. Best regards, Harry |
||||
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Ulitzer’s Amazing First 30 Days in Public Beta
- "Government IT Expo" to Highlight Cloud Computing and SOA
- Ulitzer vs. Ning - a Quick Review
- Improving the Efficiency of SOA-Based Applications
- Make Your Design Ideas Speak: Using UML in PowerBuilder Projects
- Ted Weissman and Lois Paul & Partners PR Firm
- SOA to Reduce Complexity?
- VMware Poaches CA Exec to Run Asia Pacific
- Cisco to Buy Tidal Software
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Building the Right Project Team: The Rule of Five
- Ulitzer’s Amazing First 30 Days in Public Beta
- "Government IT Expo" to Highlight Cloud Computing and SOA
- DataDirect Data Integration Suite Features XQuery 4.0, XML Converters and Stylus Studio 2009
- Reducing Development Costs with SOA
- Macrovision White Paper Showcases Digital Entertainment Media
- Software AG Releases Tamino XML Server for SOA Interface
- Dajeil Launches Xerces/Xalan Hardware Accelerator for XML and SOA
- Ulitzer vs. Ning - a Quick Review
- AJAX World RIA Conference & Expo Kicks Off in New York City
- JSON vs XML - A Jason vs Freddie Sequel
- Processing XML with C# and .NET
- i-Technology Viewpoint: The Very Confused World of 3D and XML
- BPEL Processes and Human Workflow
- Open Source Database Special Feature: An Introduction to Berkeley DB XML
- "HP's Problem Ain't the SAP Install," Says Sun's Schwartz
- eXist - An Introduction To Open Source Native XML Database
- Digitizing the Planet: Google Earth vs MSN Virtual Earth vs MapQuest
- Product Review: Altova Enterprise Suite 2005






































