Revealing the X/O Impedance Mismatch
We take the term X/O impedance mismatch to describe the difficulty of the OO paradigm to accommodate XML processing by means of recasting it to typed OO programming. In particular, given XML types (say, XML schemas), it is notoriously difficult to map the
- PDF / 999,146 Bytes
- 83 Pages / 430 x 660 pts Page_size
- 77 Downloads / 160 Views
oduction
XML is ubiquitous in today’s application development, which is otherwise biased towards the OO paradigm. XML data needs to be regularly produced or consumed by (OO) applications. Such need arises for the request/response tiers of WebServices, and the data storage tiers of many applications, as well as the import/export tiers of applications in ‘standardized’ industries. A very OO-biased developer (as opposed to an XML aficionado) expects to be able to exercise all these scenarios on the grounds of the familiar OO paradigm while taking advantage of a domain-specific object model tailored to the XML data at hand — without the need to deal with XML intimately. The so-called X/O Impedance Mismatch challenges this expectation. 1.1
What Is the X/O Impedance Mismatch Anyway?
Quoting Wikipedia1 , “‘Impedance mismatch’ is derived from the usage of impedance as a measurement of the ability of one system to efficiently accommodate the output (energy, information, etc.) of another. [...] Although the term originated in the field of electrical engineering, it has been generalized and used as a term of art in systems analysis, electronics, computer science, informatics, 1
http://en.wikipedia.org/wiki/Impedance mismatch, captured on 9 January, 2007.
R. Backhouse et al. (Eds.): Datatype-Generic Programming 2006, LNCS 4719, pp. 285–367, 2007. c Springer-Verlag Berlin Heidelberg 2007
286
R. L¨ ammel and E. Meijer
and physics.” In particular, the term is also used “to refer to the difficulties encountered when attempting to connect two systems which have very different conceptual bases”. In the case of the X/O Impedance Mismatch, we are talking about the “systems” of XML and objects with their data models, programming models and type systems as conceptual bases. “Connecting” XML and objects is best called X/O mapping, also known as XML-data binding [10,38,31,51,11]. In particular, the X/O Impedance Mismatch appears to be associated with canonical XML-toobject type-based mappings (abbreviated as X-to-O mappings from here on). Such a mapping is meant to automatically derive object types (say, object models) from given XML types (say, XML schemas) in a canonical manner. The qualifier ‘canonical’ emphasizes that the mapping is ‘generic’ as opposed to ‘problemspecific’, (or ‘programmatic’, or ‘user-defined’). We take the term X/O Impedance Mismatch to refer to the difficulty of devising a (canonical) X-to-O mapping such that the resulting, schema-derived object types (i) reasonably compare to native object types typically devised by OO developers; (ii) fully preserve the intent of the original XML types; (iii) fully support round-tripping of arbitrary, valid XML data; and (iv) provide a general and convenient programming model for XML data hosted by objects. We contend that our ‘definition’ essentially subsumes the characterizations that have been suggested elsewhere [42,58,37,62,61,17] — except that we focus on the X-to-O direction of mapping; we also focus on canonical mappings. Our hypothesis is here that the mastery of canonical X
Data Loading...