[Home] [By Thread] [By Date] [Recent Entries]
Michael Kay wrote: > > >> Wonderful answer for those who don't have any performance >> concerns and are more comfortable working in XML than in data >> structures. The web services world, however, is generally >> quite concerned about both performance and ease of use for >> programmers, and because of these issues data binding is used >> for the vast majority of web services. >> > > I don't agree: on both ease-of-use and performance I would go for XSLT or > XQuery in preference to lower-level languages every time. > > If you're receiving lexical XML from a web service, the time taken to > process it in XSLT or XQuery is usually less than the time taken to parse > and validate it. I would take a lot of convincing that a data binding > approach is likely to be faster, given the cost of marshalling and > unmarshalling the data. > Current generation data binding tools unmarshal and marshal as fast or faster than just building or serializing a DOM, and access is much faster and easier than using XSLT or XQuery to access data from said DOM. Have you actually tried any comparisons? Even back six years ago my JiBX data binding was faster than the best of the DOM-type models (dom4j), as discussed in this article: http://www.ibm.com/developerworks/xml/library/x-databdopt2/ Data binding also generally uses much less memory than a DOM model, because only the data values are represented rather than all the details of the XML structure. As for validation, it is rarely used in production systems due to the large performance overhead. XQuery may be usable when you only need a few selected items of data from the documents, but it's not a realistic approach when all the data in the document is actually used by the application. > And on ease of use, I've seen programmers struggling with regenerating all > their Java classes when the schema changes and it's horrendous. (Worse, I've > seen people refuse to change the schema because it has become too expensive > to contemplate!) Having two different models of the same data, understanding > how they relate, and organizing yourself to keep them in sync is simply > complexity that you don't need. > For most web services applications the Java (or other programming language) representation is actually primary, and XML is just being used for interchange. Do you seriously expect developers to go back to creating DOM representations from their data structures, and vice versa? - Dennis
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



